# HG changeset patch # User RhodeCode Admin # Date 2024-04-26 10:06:48 # Node ID d777c8d3d46b49915d73ef247b730c36a97c3e0c # Parent b5200639d0cd4b4a28af9292a208f8bf4c3d8dd8 feat(cache): disable cache before using d_cache call to skip init of dcache on no-cached calls diff --git a/rhodecode/apps/repository/views/repo_files.py b/rhodecode/apps/repository/views/repo_files.py --- 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',