Skip to content

cache

Application cache config.

config module-attribute

config = CacheConfig(
    backend=redis.client,
    expiration=settings.api.CACHE_EXPIRATION,
    cache_key_builder=cache_key_builder,
)

Cache configuration for application.

cache_key_builder

cache_key_builder(request)

Parameters:

Name Type Description Default
request Request[Any, Any]

Current request instance.

required

Returns:

Type Description
str

App slug prefixed cache key.