Interfaces
- interface dataflake.cache.interfaces.ICache
Simple cache interface
- get(key, default=None)
Get value for the given key
If no value is found or the value is invalid, the default value will be returned.
- invalidate(key=None)
Invalidate the given key, or all key/values if no key is passed.
- items()
Return all cached keys and values
Returns a sequence of (key, value) tuples.
- keys()
Return all cache keys
- set(key, value)
Store a key/value pair
- values()
Return all cached values
- interface dataflake.cache.interfaces.ITimeoutCache
Extends:
dataflake.cache.interfaces.ICache
Simple cache with a timeout
Only records younger than the configured timeout are returned
- getTimeout()
Get the timeout value
- setTimeout(timeout)
Set a timeout value in seconds