TileStache.Memcache
index

Caches tiles to Memcache.
 
Requires python-memcached:
  http://pypi.python.org/pypi/python-memcached
 
Example configuration:
 
  "cache": {
    "name": "Memcache",
    "servers": ["127.0.0.1:11211"],
    "revision": 0
  }
 
Memcache cache parameters:
 
  servers
    Optional array of servers, list of "{host}:{port}" pairs.
    Defaults to ["127.0.0.1:11211"] if omitted.
 
  revision
    Optional revision number for mass-expiry of cached tiles
    regardless of lifespan. Defaults to 0.

 
Classes
       
Cache

 
class Cache
     Methods defined here:
__init__(self, servers=['127.0.0.1:11211'], revision=0)
lock(self, layer, coord, format)
Acquire a cache lock for this tile.
 
Returns nothing, but blocks until the lock has been acquired.
read(self, layer, coord, format)
Read a cached tile.
save(self, body, layer, coord, format)
Save a cached tile.
unlock(self, layer, coord, format)
Release a cache lock for this tile.

 
Functions
       
tile_key(layer, coord, format, rev)
Return a tile key string.