Documentation Index
Fetch the complete documentation index at: https://docs.maximem.ai/llms.txt
Use this file to discover all available pages before exploring further.
stats() returns a dict describing the current state of the SDK’s local cache: how many entries it holds across all backends, total storage footprint, and a per-backend breakdown. Use it to verify your cache configuration is taking effect, to monitor cache size in production, or to debug stale-data issues during development.
This is a synchronous method — no await. If the cache manager is not initialized (e.g., caching disabled in SDKConfig), the returned dict is {"enabled": False}.
Parameters
This method takes no parameters.Returns
Adict[str, Any] describing cache state.
Whether the local cache is active.
False indicates no other fields will be present.The client identifier the cache is scoped to.
Filesystem path where cache backends store their data.
Total number of entries summed across all backends.
Total storage footprint in bytes, summed across all backends.
Per-backend stats. Each entry has a
key (backend identifier) plus that backend’s own metrics (entry_count, total_bytes, and any backend-specific fields).Example
Raises
This method does not raise SDK errors. See Error Codes for the full SDK exception hierarchy.See also
- cache.clear — drop the entire local cache.
- cache.clear_user — drop one user’s cached data (GDPR).
- cache.clear_customer — drop one customer’s cached data.