2018-12-21 05:48:22 +01:00
|
|
|
from django.core.cache import cache
|
|
|
|
|
2017-11-20 02:07:27 +01:00
|
|
|
from c3nav.mapdata.utils.cache.indexed import GeometryIndexed # noqa
|
|
|
|
from c3nav.mapdata.utils.cache.maphistory import MapHistory # noqa
|
2017-11-20 17:21:19 +01:00
|
|
|
from c3nav.mapdata.utils.cache.accessrestrictions import AccessRestrictionAffected # noqa
|
2017-11-20 21:14:46 +01:00
|
|
|
from c3nav.mapdata.utils.cache.package import CachePackage # noqa
|
2018-12-21 05:48:22 +01:00
|
|
|
|
|
|
|
|
|
|
|
def increment_cache_key(cache_key):
|
|
|
|
try:
|
|
|
|
cache.incr(cache_key)
|
|
|
|
except ValueError:
|
|
|
|
cache.set(cache_key, 0, None)
|