Simple instance-level cache
Get value for the given key
If no value is found the default value will be returned.
Invalidate the given key, or all key/values if no key is passed.
Return all cached keys and values
Returns a sequence of (key, value) tuples.
Return all cache keys
Store a key/value pair
Return all cached values
Simple module-level cache protected by a lock serializing access
Get value for the given key
If no value is found the default value will be returned.
Invalidate the given key, or all key/values if no key is passed.
Return all cached keys and values
Returns a sequence of (key, value) tuples.
Return all cache keys
Store a key/value pair
Return all cached values