App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | Public Attributes | List of all members
google.appengine._internal.django.core.cache.backends.base.BaseCache Class Reference
Inheritance diagram for google.appengine._internal.django.core.cache.backends.base.BaseCache:
google.appengine._internal.django.core.cache.backends.db.CacheClass google.appengine._internal.django.core.cache.backends.dummy.CacheClass google.appengine._internal.django.core.cache.backends.filebased.CacheClass google.appengine._internal.django.core.cache.backends.locmem.CacheClass google.appengine._internal.django.core.cache.backends.memcached.CacheClass

Public Member Functions

def __init__
 
def add
 
def get
 
def set
 
def delete
 
def get_many
 
def has_key
 
def incr
 
def decr
 
def __contains__
 
def set_many
 
def delete_many
 
def clear
 
def validate_key
 

Public Attributes

 default_timeout
 

Member Function Documentation

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: