Show More
@@ -617,7 +617,7 b' def get_repo_fts_tree(request, apiuser, ' | |||||
617 | cache_namespace_uid = 'cache_repo.{}'.format(repo_id) |
|
617 | cache_namespace_uid = 'cache_repo.{}'.format(repo_id) | |
618 | region = rc_cache.get_or_create_region('cache_repo', cache_namespace_uid) |
|
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 |
|
620 | def compute_fts_tree(cache_ver, repo_id, commit_id, root_path): | |
621 | return ScmModel().get_fts_data(repo_id, commit_id, root_path) |
|
621 | return ScmModel().get_fts_data(repo_id, commit_id, root_path) | |
622 |
|
622 | |||
623 | try: |
|
623 | try: | |
@@ -638,7 +638,7 b' def get_repo_fts_tree(request, apiuser, ' | |||||
638 | 'with caching: %s[TTL: %ss]' % ( |
|
638 | 'with caching: %s[TTL: %ss]' % ( | |
639 | repo_id, commit_id, cache_on, cache_seconds or 0)) |
|
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 |
|
641 | tree_files = compute_fts_tree(rc_cache.FILE_TREE_CACHE_VER, repo_id, commit_id, root_path) | |
642 | return tree_files |
|
642 | return tree_files | |
643 |
|
643 | |||
644 | except Exception: |
|
644 | except Exception: |
@@ -272,7 +272,8 b' class RepoFilesView(RepoAppView):' | |||||
272 | 'rhodecode:templates/files/files_browser_tree.mako', |
|
272 | 'rhodecode:templates/files/files_browser_tree.mako', | |
273 | self._get_template_context(c), self.request) |
|
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 | def _get_archive_spec(self, fname): |
|
278 | def _get_archive_spec(self, fname): | |
278 | log.debug('Detecting archive spec for: `%s`', fname) |
|
279 | log.debug('Detecting archive spec for: `%s`', fname) |
@@ -47,6 +47,9 b' from .utils import (' | |||||
47 | FreshRegionCache, ActiveRegionCache) |
|
47 | FreshRegionCache, ActiveRegionCache) | |
48 |
|
48 | |||
49 |
|
49 | |||
|
50 | FILE_TREE_CACHE_VER = 'v2' | |||
|
51 | ||||
|
52 | ||||
50 | def configure_dogpile_cache(settings): |
|
53 | def configure_dogpile_cache(settings): | |
51 | cache_dir = settings.get('cache_dir') |
|
54 | cache_dir = settings.get('cache_dir') | |
52 | if cache_dir: |
|
55 | if cache_dir: |
General Comments 0
You need to be logged in to leave comments.
Login now