def google.appengine._internal.django.core.cache.backends.base.BaseCache.__contains__ |
( |
|
self, |
|
|
|
key |
|
) |
| |
Returns True if the key is in the cache and has not expired.
def google.appengine._internal.django.core.cache.backends.base.BaseCache.add |
( |
|
self, |
|
|
|
key, |
|
|
|
value, |
|
|
|
timeout = None |
|
) |
| |
Set a value in the cache if the key does not already exist. If
timeout is given, that timeout will be used for the key; otherwise
the default cache timeout will be used.
Returns True if the value was stored, False otherwise.
def google.appengine._internal.django.core.cache.backends.base.BaseCache.clear |
( |
|
self | ) |
|
Remove *all* values from the cache at once.
def google.appengine._internal.django.core.cache.backends.base.BaseCache.decr |
( |
|
self, |
|
|
|
key, |
|
|
|
delta = 1 |
|
) |
| |
Subtract delta from value in the cache. If the key does not exist, raise
a ValueError exception.
def google.appengine._internal.django.core.cache.backends.base.BaseCache.delete |
( |
|
self, |
|
|
|
key |
|
) |
| |
Delete a key from the cache, failing silently.
def google.appengine._internal.django.core.cache.backends.base.BaseCache.delete_many |
( |
|
self, |
|
|
|
keys |
|
) |
| |
Set a bunch of values in the cache at once. For certain backends
(memcached), this is much more efficient than calling delete() multiple
times.
def google.appengine._internal.django.core.cache.backends.base.BaseCache.get |
( |
|
self, |
|
|
|
key, |
|
|
|
default = None |
|
) |
| |
Fetch a given key from the cache. If the key does not exist, return
default, which itself defaults to None.
def google.appengine._internal.django.core.cache.backends.base.BaseCache.get_many |
( |
|
self, |
|
|
|
keys |
|
) |
| |
Fetch a bunch of keys from the cache. For certain backends (memcached,
pgsql) this can be *much* faster when fetching multiple values.
Returns a dict mapping each key in keys to its value. If the given
key is missing, it will be missing from the response dict.
def google.appengine._internal.django.core.cache.backends.base.BaseCache.has_key |
( |
|
self, |
|
|
|
key |
|
) |
| |
Returns True if the key is in the cache and has not expired.
def google.appengine._internal.django.core.cache.backends.base.BaseCache.incr |
( |
|
self, |
|
|
|
key, |
|
|
|
delta = 1 |
|
) |
| |
Add delta to value in the cache. If the key does not exist, raise a
ValueError exception.
def google.appengine._internal.django.core.cache.backends.base.BaseCache.set |
( |
|
self, |
|
|
|
key, |
|
|
|
value, |
|
|
|
timeout = None |
|
) |
| |
Set a value in the cache. If timeout is given, that timeout will be
used for the key; otherwise the default cache timeout will be used.
def google.appengine._internal.django.core.cache.backends.base.BaseCache.set_many |
( |
|
self, |
|
|
|
data, |
|
|
|
timeout = None |
|
) |
| |
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, that timeout will be used for the key; otherwise
the default cache timeout will be used.
def google.appengine._internal.django.core.cache.backends.base.BaseCache.validate_key |
( |
|
self, |
|
|
|
key |
|
) |
| |
Warn about keys that would not be portable to the memcached
backend. This encourages (but does not force) writing backend-portable
cache code.
The documentation for this class was generated from the following file:
- code/googleappengine-read-only/python/google/appengine/_internal/django/core/cache/backends/base.py