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',