add todo to optimize locations_for_request
This commit is contained in:
parent
ef5ef51d98
commit
33c5299b3e
1 changed files with 1 additions and 0 deletions
|
@ -26,6 +26,7 @@ proxied_cache = LocalCacheProxy(maxsize=128)
|
||||||
|
|
||||||
|
|
||||||
def locations_for_request(request) -> Mapping[int, LocationSlug]:
|
def locations_for_request(request) -> Mapping[int, LocationSlug]:
|
||||||
|
# todo this takes a long time because it's a lot of data, we might want to change that
|
||||||
cache_key = 'mapdata:locations:%s' % AccessPermission.cache_key_for_request(request)
|
cache_key = 'mapdata:locations:%s' % AccessPermission.cache_key_for_request(request)
|
||||||
locations = proxied_cache.get(cache_key, None)
|
locations = proxied_cache.get(cache_key, None)
|
||||||
if locations is not None:
|
if locations is not None:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue