View module source on GitHub

MaximInMemoryCache

class MaximInMemoryCache()

In-memory cache implementation for Maxim.

This class provides a simple in-memory cache implementation that stores key-value pairs in a dictionary.

__init__

def __init__()

Initialize the in-memory cache.

get_all_keys

def get_all_keys() -> List[str]

Get all keys currently stored in the cache.

get

def get(key: str) -> Optional[str]

Get a value from the cache by its key.

set

def set(key: str, value: str) -> None

Store a key-value pair in the cache.

delete

def delete(key: str) -> None

Remove a key-value pair from the cache.