mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-31 01:38:08 -05:00
Fix bug counting misses in chains with no permanent caches.
This commit is contained in:
@@ -439,6 +439,10 @@ class CacheChain(CacheUtils, local):
|
||||
if v != NoneResult)
|
||||
|
||||
if self.stats:
|
||||
if not misses:
|
||||
# If this chain contains no permanent caches, then we need to
|
||||
# count the misses here.
|
||||
misses = len(need)
|
||||
self.stats.cache_hit(hits)
|
||||
self.stats.cache_miss(misses)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user