mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 23:02:19 +00:00
Set if we can't incr
This commit is contained in:
@@ -23,7 +23,10 @@ IGNORED_ERRORS = range(200, 223)
|
|||||||
def stat_update_count(key, incr=1):
|
def stat_update_count(key, incr=1):
|
||||||
"""Increment a key on the Cache, for stats monitoring"""
|
"""Increment a key on the Cache, for stats monitoring"""
|
||||||
if getattr(settings, 'EVE_PROXY_STATS', False) and len(getattr(settings, 'CACHES', {})):
|
if getattr(settings, 'EVE_PROXY_STATS', False) and len(getattr(settings, 'CACHES', {})):
|
||||||
cache.incr(key, incr)
|
try:
|
||||||
|
cache.incr(key, incr)
|
||||||
|
except ValueError:
|
||||||
|
cache.set(key, incr)
|
||||||
|
|
||||||
class CachedDocumentManager(models.Manager):
|
class CachedDocumentManager(models.Manager):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user