Skip to content

Commit 16ec2f8

Browse files
authored
Revert "Fixed incompatibility with django_redis >= 4.12.0 (#416)" (#458)
1 parent 0010ce4 commit 16ec2f8

File tree

1 file changed

+1
-2
lines changed
  • django_prometheus/cache/backends

1 file changed

+1
-2
lines changed

django_prometheus/cache/backends/redis.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from django.core.cache.backends.redis import RedisCache as DjangoRedisCache
22
from django_redis import cache, exceptions
33

4-
54
from django_prometheus.cache.metrics import (
65
django_cache_get_fail_total,
76
django_cache_get_total,
@@ -22,7 +21,7 @@ def get(self, key, default=None, version=None, client=None):
2221
django_cache_get_fail_total.labels(backend="redis").inc()
2322
if self._ignore_exceptions:
2423
if self._log_ignored_exceptions:
25-
self.logger.error(str(e))
24+
cache.logger.error(str(e))
2625
return default
2726
raise
2827
else:

0 commit comments

Comments
 (0)