From 695fc88813eb716018a71f801c111de540c3d42f Mon Sep 17 00:00:00 2001 From: RhodeCode Admin Date: Fri, 26 Apr 2024 12:06:48 +0200 Subject: [PATCH] feat(cache): disable cache before using d_cache call to skip init of dcache on no-cached calls --- rhodecode/apps/repository/views/repo_files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rhodecode/apps/repository/views/repo_files.py b/rhodecode/apps/repository/views/repo_files.py index c55782a0..f8919565 100644 --- a/rhodecode/apps/repository/views/repo_files.py +++ b/rhodecode/apps/repository/views/repo_files.py @@ -421,7 +421,7 @@ class RepoFilesView(RepoAppView): with ReentrantLock(d_cache, reentrant_lock_key): # This is also a cache key use_cached_archive = False - if archive_name_key in d_cache and not archive_cache_disable: + if not archive_cache_disable and archive_name_key in d_cache: reader, tag = d_cache.get(archive_name_key, read=True, tag=True, retry=True) use_cached_archive = True log.debug('Found cached archive as key=%s tag=%s, serving archive from cache reader=%s',