##// END OF EJS Templates
cache: bump file-tree caches to next iteration
marcink -
r4036:6ca2afaa default
parent child Browse files
Show More
@@ -617,7 +617,7 b' def get_repo_fts_tree(request, apiuser, '
617 617 cache_namespace_uid = 'cache_repo.{}'.format(repo_id)
618 618 region = rc_cache.get_or_create_region('cache_repo', cache_namespace_uid)
619 619
620 def compute_fts_tree(repo_id, commit_id, root_path, cache_ver):
620 def compute_fts_tree(cache_ver, repo_id, commit_id, root_path):
621 621 return ScmModel().get_fts_data(repo_id, commit_id, root_path)
622 622
623 623 try:
@@ -638,7 +638,7 b' def get_repo_fts_tree(request, apiuser, '
638 638 'with caching: %s[TTL: %ss]' % (
639 639 repo_id, commit_id, cache_on, cache_seconds or 0))
640 640
641 tree_files = compute_fts_tree(repo_id, commit_id, root_path, 'v1')
641 tree_files = compute_fts_tree(rc_cache.FILE_TREE_CACHE_VER, repo_id, commit_id, root_path)
642 642 return tree_files
643 643
644 644 except Exception:
@@ -272,7 +272,8 b' class RepoFilesView(RepoAppView):'
272 272 'rhodecode:templates/files/files_browser_tree.mako',
273 273 self._get_template_context(c), self.request)
274 274
275 return compute_file_tree('v1', self.db_repo.repo_id, commit_id, f_path, full_load)
275 return compute_file_tree(
276 rc_cache.FILE_TREE_CACHE_VER, self.db_repo.repo_id, commit_id, f_path, full_load)
276 277
277 278 def _get_archive_spec(self, fname):
278 279 log.debug('Detecting archive spec for: `%s`', fname)
@@ -47,6 +47,9 b' from .utils import ('
47 47 FreshRegionCache, ActiveRegionCache)
48 48
49 49
50 FILE_TREE_CACHE_VER = 'v2'
51
52
50 53 def configure_dogpile_cache(settings):
51 54 cache_dir = settings.get('cache_dir')
52 55 if cache_dir:
General Comments 0
You need to be logged in to leave comments. Login now