Skip to content

cache

dandy.cache.cache

BaseCache

Bases: ABC, BaseModel

cache_name instance-attribute

limit instance-attribute

__len__ abstractmethod

Source code in dandy/cache/cache.py
@abstractmethod
def __len__(self) -> int:
    raise NotImplementedError

get abstractmethod

Source code in dandy/cache/cache.py
@abstractmethod
def get(self, key: str) -> Any | None:
    raise NotImplementedError

set abstractmethod

Source code in dandy/cache/cache.py
@abstractmethod
def set(self, key: str, value: Any):
    raise NotImplementedError

clean abstractmethod

Source code in dandy/cache/cache.py
@abstractmethod
def clean(self):
    raise NotImplementedError

clear abstractmethod classmethod

Source code in dandy/cache/cache.py
@classmethod
@abstractmethod
def clear(cls, cache_name: str = CACHE_DEFAULT_NAME):
    raise NotImplementedError

clear_all abstractmethod classmethod

Source code in dandy/cache/cache.py
@classmethod
@abstractmethod
def clear_all(cls):
    raise NotImplementedError

destroy_all abstractmethod classmethod

Source code in dandy/cache/cache.py
@classmethod
@abstractmethod
def destroy_all(cls):
    raise NotImplementedError