Module: google.appengine.api.memcache

Memcache API.

Provides memcached-alike API to application developers to store data in memory when reliable storage via the DataStore API isn't required and higher performance is desired.

Modules

memcache_stub module: Stub version of the memcache API, keeping all data in process memory.

Classes

class Client: Memcache client object, through which one invokes all memcache operations.

class ItemWithTimestamps: A Memcache item with its relevant timestamps.

Functions

add(...): Sets a key's value if the item is not already in memcache.

add_multi(...): Set multiple keys' values if items are not already in memcache.

create_rpc(...): Creates an RPC object for use with the memcache API.

debuglog(...): Logging function for debugging information.

decr(...): Atomically decrements a key's value.

delete(...): Deletes a key from memcache.

delete_multi(...): Delete multiple keys at once.

disconnect_all(...): Closes all connections to memcache servers.

flush_all(...): Deletes everything in memcache.

forget_dead_hosts(...): Resets all servers to the alive status.

get(...): Looks up a single key in memcache.

get_multi(...): Looks up multiple keys from memcache in one operation.

get_stats(...): Gets memcache statistics for this application.

incr(...): Atomically increments a key's value.

offset_multi(...): Offsets multiple keys by a delta, incrementing and decrementing in batch.

peek(...): Gets an item from memcache along with its timestamp metadata.

peek_multi(...): Gets multiple items from memcache along with their timestamp metadata.

replace(...): Replaces a key's value, failing if item isn't already in memcache.

replace_multi(...): Replace multiple keys' values, failing if the items aren't in memcache.

set(...): Sets a key's value, regardless of previous contents in cache.

set_multi(...): Set multiple keys' values at once, regardless of previous contents.

set_servers(...): Sets the pool of memcache servers used by the client.

setup_client(...): Sets the Client object instance to use for all module-level methods.

CAPABILITY Instance of google.appengine.api.capabilities.CapabilitySet
DELETE_ITEM_MISSING 1
DELETE_NETWORK_FAILURE 0
DELETE_SUCCESSFUL 2
ERROR 3
EXISTS 4
FLAG_COMPRESSED 8
FLAG_TYPE_MASK 7
MAX_KEY_SIZE 250
MAX_VALUE_SIZE 1000000
NOT_STORED 2
STAT_BYTES 'bytes'
STAT_BYTE_HITS 'byte_hits'
STAT_HITS 'hits'
STAT_ITEMS 'items'
STAT_MISSES 'misses'
STAT_OLDEST_ITEM_AGES 'oldest_item_age'
STORED 1
TYPE_BOOL 5
TYPE_INT 3
TYPE_LONG 4
TYPE_PICKLED 2
TYPE_STR 0
TYPE_UNICODE 1