configurable in-memory cache sizes
This commit is contained in:
parent
62ce1ab1e0
commit
a8261d0b3d
3 changed files with 8 additions and 2 deletions
|
@ -8,6 +8,7 @@ from itertools import chain
|
|||
from typing import Any, List, Mapping, Optional, Union
|
||||
|
||||
from django.apps import apps
|
||||
from django.conf import settings
|
||||
from django.db.models import Prefetch, Q
|
||||
from django.utils.functional import cached_property
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
@ -24,7 +25,7 @@ from c3nav.mapdata.utils.cache.local import LocalCacheProxy
|
|||
from c3nav.mapdata.utils.geometry import unwrap_geom
|
||||
from c3nav.mapdata.utils.models import get_submodels
|
||||
|
||||
proxied_cache = LocalCacheProxy(maxsize=128)
|
||||
proxied_cache = LocalCacheProxy(maxsize=settings.CACHE_SIZE_LOCATIONS)
|
||||
|
||||
|
||||
def locations_for_request(request) -> Mapping[int, LocationSlug]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue