apifrom.utils.cache_advanced

Overview

Classes

  • CacheBackend

  • CacheItem

  • MemoryCacheBackend

Classes

CacheBackend:bases: Generic[T]

Base cache backend interface.

apifrom.utils.cache_advanced.clear()
:abstractmethod:
:async:

Clear the entire cache.

apifrom.utils.cache_advanced.delete(key)
:abstractmethod:
:async:

Delete a value from the cache.

apifrom.utils.cache_advanced.delete_by_dependencies(keys)
:abstractmethod:
:async:

Delete values with specified dependencies.

apifrom.utils.cache_advanced.delete_by_tags(tags)
:abstractmethod:
:async:

Delete values with specified tags.

apifrom.utils.cache_advanced.get(key)
:abstractmethod:
:async:

Get a value from the cache.

apifrom.utils.cache_advanced.set(key, value, ttl=None, tags=None, dependencies=None)
:abstractmethod:
:async:

Set a value in the cache.

CacheItem(key, value, expires_at = None, tags = None, dependencies = None):bases: Generic[T]

Cache item with metadata.

MemoryCacheBackend(max_size = None):bases: CacheBackend[T]

In-memory cache backend implementation.

apifrom.utils.cache_advanced.clear()
:async:

Clear the entire cache.

apifrom.utils.cache_advanced.delete(key)
:async:

Delete a value from the cache.

apifrom.utils.cache_advanced.delete_by_dependencies(keys)
:async:

Delete values with specified dependencies.

apifrom.utils.cache_advanced.delete_by_tags(tags)
:async:

Delete values with specified tags.

apifrom.utils.cache_advanced.get(key)
:async:

Get a value from the cache.

apifrom.utils.cache_advanced.set(key, value, ttl=None, tags=None, dependencies=None)
:async:

Set a value in the cache.