speasy.core.cache.cache module
- class speasy.core.cache.cache.Cache(cache_path: str = '', cache_type: str = 'Cache')[source]
Bases:
object- cache_file
- cache_type
- drop_matching_entries(pattern: str | Pattern)[source]
Drop all cache entries that match a given pattern
- Parameters:
- patternstr or re.Pattern
The pattern to match cache keys against
- transact(key: str | None = None)[source]
Open a transaction context.
For a single Cache the
keyargument is ignored. For a FanoutCache the transaction is per-shard andkeyselects the shard — atomicity only applies within that shard, so all operations in the block must target the same shard key.
- property version