##// END OF EJS Templates
db: introduce long_term_file beaker cache to store README and RSS cache on disk where it is reusable between processes - not in worker memory
Mads Kiilerich -
r8211:dd317126 default
parent child Browse files
Show More
@@ -275,7 +275,7 b' celery.task_always_eager = false'
275 beaker.cache.data_dir = %(here)s/data/cache/data
275 beaker.cache.data_dir = %(here)s/data/cache/data
276 beaker.cache.lock_dir = %(here)s/data/cache/lock
276 beaker.cache.lock_dir = %(here)s/data/cache/lock
277
277
278 beaker.cache.regions = short_term,long_term,sql_cache_short
278 beaker.cache.regions = short_term,long_term,sql_cache_short,long_term_file
279
279
280 beaker.cache.short_term.type = memory
280 beaker.cache.short_term.type = memory
281 beaker.cache.short_term.expire = 60
281 beaker.cache.short_term.expire = 60
@@ -289,6 +289,10 b' beaker.cache.sql_cache_short.type = memo'
289 beaker.cache.sql_cache_short.expire = 10
289 beaker.cache.sql_cache_short.expire = 10
290 beaker.cache.sql_cache_short.key_length = 256
290 beaker.cache.sql_cache_short.key_length = 256
291
291
292 beaker.cache.long_term_file.type = file
293 beaker.cache.long_term_file.expire = 604800
294 beaker.cache.long_term_file.key_length = 256
295
292 ####################################
296 ####################################
293 ### BEAKER SESSION ####
297 ### BEAKER SESSION ####
294 ####################################
298 ####################################
@@ -101,7 +101,7 b' class FeedController(BaseRepoController)'
101 def _feed(self, repo_name, feeder):
101 def _feed(self, repo_name, feeder):
102 """Produce a simple feed"""
102 """Produce a simple feed"""
103
103
104 @cache_region('long_term', '_get_feed_from_cache')
104 @cache_region('long_term_file', '_get_feed_from_cache')
105 def _get_feed_from_cache(*_cache_keys): # parameters are not really used - only as caching key
105 def _get_feed_from_cache(*_cache_keys): # parameters are not really used - only as caching key
106 header = dict(
106 header = dict(
107 title=_('%s %s feed') % (c.site_name, repo_name),
107 title=_('%s %s feed') % (c.site_name, repo_name),
@@ -66,7 +66,7 b' class SummaryController(BaseRepoControll'
66 repo_name = db_repo.repo_name
66 repo_name = db_repo.repo_name
67 log.debug('Looking for README file')
67 log.debug('Looking for README file')
68
68
69 @cache_region('long_term', '_get_readme_from_cache')
69 @cache_region('long_term_file', '_get_readme_from_cache')
70 def _get_readme_from_cache(*_cache_keys): # parameters are not really used - only as caching key
70 def _get_readme_from_cache(*_cache_keys): # parameters are not really used - only as caching key
71 readme_data = None
71 readme_data = None
72 readme_file = None
72 readme_file = None
@@ -381,7 +381,7 b' celery.task_always_eager = false'
381 beaker.cache.data_dir = %(here)s/data/cache/data
381 beaker.cache.data_dir = %(here)s/data/cache/data
382 beaker.cache.lock_dir = %(here)s/data/cache/lock
382 beaker.cache.lock_dir = %(here)s/data/cache/lock
383
383
384 beaker.cache.regions = short_term,long_term,sql_cache_short
384 beaker.cache.regions = short_term,long_term,sql_cache_short,long_term_file
385
385
386 beaker.cache.short_term.type = memory
386 beaker.cache.short_term.type = memory
387 beaker.cache.short_term.expire = 60
387 beaker.cache.short_term.expire = 60
@@ -395,6 +395,10 b' beaker.cache.sql_cache_short.type = memo'
395 beaker.cache.sql_cache_short.expire = 10
395 beaker.cache.sql_cache_short.expire = 10
396 beaker.cache.sql_cache_short.key_length = 256
396 beaker.cache.sql_cache_short.key_length = 256
397
397
398 beaker.cache.long_term_file.type = file
399 beaker.cache.long_term_file.expire = 604800
400 beaker.cache.long_term_file.key_length = 256
401
398 <%text>####################################</%text>
402 <%text>####################################</%text>
399 <%text>### BEAKER SESSION ####</%text>
403 <%text>### BEAKER SESSION ####</%text>
400 <%text>####################################</%text>
404 <%text>####################################</%text>
General Comments 0
You need to be logged in to leave comments. Login now