class BaseCache:
Undocumented
Method | __contains__ |
Return True if the key is in the cache and has not expired. |
Method | __init__ |
Undocumented |
Async Method | aadd |
Undocumented |
Async Method | aclear |
Undocumented |
Async Method | aclose |
Undocumented |
Method | add |
Set a value in the cache if the key does not already exist. If timeout is given, use that timeout for the key; otherwise use the default cache timeout. |
Async Method | adecr |
Undocumented |
Async Method | adecr_version |
Undocumented |
Async Method | adelete |
Undocumented |
Async Method | adelete_many |
Undocumented |
Async Method | aget |
Undocumented |
Async Method | aget_many |
See get_many(). |
Async Method | aget_or_set |
See get_or_set(). |
Async Method | ahas_key |
Undocumented |
Async Method | aincr |
See incr(). |
Async Method | aincr_version |
See incr_version(). |
Async Method | aset |
Undocumented |
Async Method | aset_many |
Undocumented |
Async Method | atouch |
Undocumented |
Method | clear |
Remove all values from the cache at once. |
Method | close |
Close the cache connection |
Method | decr |
Subtract delta from value in the cache. If the key does not exist, raise a ValueError exception. |
Method | decr_version |
Subtract delta from the cache version for the supplied key. Return the new version. |
Method | delete |
Delete a key from the cache and return whether it succeeded, failing silently. |
Method | delete_many |
Delete a bunch of values in the cache at once. For certain backends (memcached), this is much more efficient than calling delete() multiple times. |
Method | get |
Fetch a given key from the cache. If the key does not exist, return default, which itself defaults to None. |
Method | get_backend_timeout |
Return the timeout value usable by this backend based upon the provided timeout. |
Method | get_many |
Fetch a bunch of keys from the cache. For certain backends (memcached, pgsql) this can be much faster when fetching multiple values. |
Method | get_or_set |
No summary |
Method | has_key |
Return True if the key is in the cache and has not expired. |
Method | incr |
Add delta to value in the cache. If the key does not exist, raise a ValueError exception. |
Method | incr_version |
Add delta to the cache version for the supplied key. Return the new version. |
Method | make_and_validate_key |
Helper to make and validate keys. |
Method | make_key |
No summary |
Method | set |
Set a value in the cache. If timeout is given, use that timeout for the key; otherwise use the default cache timeout. |
Method | set_many |
Set a bunch of values in the cache at once from a dict of key/value pairs. For certain backends (memcached), this is much more efficient than calling set() multiple times. |
Method | touch |
Update the key's expiry time using timeout. Return True if successful or False if the key does not exist. |
Method | validate_key |
Warn about keys that would not be portable to the memcached backend. This encourages (but does not force) writing backend-portable cache code. |
Class Variable | _missing_key |
Undocumented |
Instance Variable | _cull_frequency |
Undocumented |
Instance Variable | _max_entries |
Undocumented |
Instance Variable | default_timeout |
Undocumented |
Instance Variable | key_func |
Undocumented |
Instance Variable | key_prefix |
Undocumented |
Instance Variable | version |
Undocumented |
Set a value in the cache if the key does not already exist. If timeout is given, use that timeout for the key; otherwise use the default cache timeout.
Return True if the value was stored, False otherwise.
Fetch a bunch of keys from the cache. For certain backends (memcached, pgsql) this can be much faster when fetching multiple values.
Return a dict mapping each key in keys to its value. If the given key is missing, it will be missing from the response dict.
Fetch a given key from the cache. If the key does not exist, add the key and set it to the default value. The default value can also be any callable. If timeout is given, use that timeout for the key; otherwise use the default cache timeout.
Return the value of the key stored or retrieved.
Set a bunch of values in the cache at once from a dict of key/value pairs. For certain backends (memcached), this is much more efficient than calling set() multiple times.
If timeout is given, use that timeout for the key; otherwise use the default cache timeout.
On backends that support it, return a list of keys that failed insertion, or an empty list if all keys were inserted successfully.