tileserver should not depend on django
This commit is contained in:
parent
7754643c4b
commit
f1d5b0ffad
3 changed files with 10 additions and 11 deletions
11
src/c3nav/mapdata/utils/cache/__init__.py
vendored
11
src/c3nav/mapdata/utils/cache/__init__.py
vendored
|
@ -1,13 +1,4 @@
|
|||
from django.core.cache import cache
|
||||
|
||||
from c3nav.mapdata.utils.cache.accessrestrictions import AccessRestrictionAffected # noqa
|
||||
from c3nav.mapdata.utils.cache.indexed import GeometryIndexed # noqa
|
||||
from c3nav.mapdata.utils.cache.maphistory import MapHistory # noqa
|
||||
from c3nav.mapdata.utils.cache.accessrestrictions import AccessRestrictionAffected # noqa
|
||||
from c3nav.mapdata.utils.cache.package import CachePackage # noqa
|
||||
|
||||
|
||||
def increment_cache_key(cache_key):
|
||||
try:
|
||||
cache.incr(cache_key)
|
||||
except ValueError:
|
||||
cache.set(cache_key, 0, None)
|
||||
|
|
8
src/c3nav/mapdata/utils/cache/stats.py
vendored
Normal file
8
src/c3nav/mapdata/utils/cache/stats.py
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
from django.core.cache import cache
|
||||
|
||||
|
||||
def increment_cache_key(cache_key):
|
||||
try:
|
||||
cache.incr(cache_key)
|
||||
except ValueError:
|
||||
cache.set(cache_key, 0, None)
|
Loading…
Add table
Add a link
Reference in a new issue