Skip to content

Commit

Permalink
Fix bug redis
Browse files Browse the repository at this point in the history
  • Loading branch information
cavanierc committed Dec 4, 2019
1 parent 5dd2777 commit 1860549
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion django_prometheus/cache/backends/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def get(self, key, default=None, version=None, client=None):
else:
if cached is not None:
django_cache_hits_total.labels(backend="redis").inc()
return cached
else:
django_cache_misses_total.labels(backend="redis").inc()
return cached or default
return default

0 comments on commit 1860549

Please sign in to comment.