Zope Interfaces


interface Products.mcdutils.interfaces.ISessionDataContainer

Document the implied interface expected by Zope’s SessionDataManager.


Return a mapping for ‘key’.

o Return None of no mapping exists.

o If not None, the returned object must be Acquisition-wrappable.


Return True if the container has the key, else False.


Return a mapping for ‘key’, creating it if needed.

o The returned object must be Acquisition-wrappable.


interface Products.mcdutils.interfaces.IMemCacheMapping

Extends: transaction.interfaces.ISavepointDataManager

Combine Python’s mapping protocol with transaction management.


interface Products.mcdutils.interfaces.IMemCacheProxy

Manage client connection to a pool of memcached servers.

add(key, value)

Store value (a mapping) for ‘key’.

o Return a boolean to indicate success.

o Like ‘set’, but stores value only if the key does not already exist.


memcache.Client instance

delete(key, time=0)

Remove the value stored in the cache under ‘key’.

o ‘time’, if passed an integer time value (in seconds) during

which the memcached server will block new writes to this key (perhaps useful in preventing race conditions).

o Return a boolean to indicate success.


Return the value stored in the cache under ‘key’.


Return a mapping of values stored in the cache under ‘keys’.

replace(key, value)

Store value (a mapping) for ‘key’.

o Return a boolean to indicate success.

o Like ‘set’, but stores value only if the key already exists.


List of servers

Each item is a <host>:<port> server address.

set(key, value)

Store value for ‘key’.

o Return a boolean to indicate success.


interface Products.mcdutils.interfaces.IMemCacheSessionDataContainer

Extends: Products.mcdutils.interfaces.ISessionDataContainer

memcache-specific SDC, using a proxy.


Path to proxy.

No session operations are possible if the path is invalid.


interface Products.mcdutils.interfaces.IZCache

Interface describing API for OFS.Cache.Cache.

ZCache_get(ob, view_name, keywords, mtime_func, default)

Fetch a cache entry for ‘ob’.

o If an object provides different views that would benefit from

caching, it will set ‘view_name’, which should be treated as part of the cache key. It defaults to the empty string.

o ‘keywords’, if passed, will be a mapping containing keys that

distinguish this cache entry from others even though ‘ob’ and ‘view_name’ are the same; the value should thus be part of the key for the entry. DTMLMethods use keywords derived from the DTML namespace.

o When the Cache calls ‘ob.ZCacheable_getModTime’,

it should pass ‘mtime_func’ as an argument. It is provided to allow cacheable objects to provide their own computation of the object’s modification time.

o If no matching entry is found, return ‘default’.


Remove any entries from the cache for ‘ob’.

ZCache_set(ob, data, view_name, keywords, mtime_func)

Store a value in the cache for ‘ob’.

o ‘data’ is the value to be stored.

o See ZCache_get() for description of the ‘keywords’, ‘mtime_func’,

and ‘default’ parameters.


interface Products.mcdutils.interfaces.IZCacheManager

Interface describing API for OFS.Cache.CacheManager.


Return an object implementing IZCache.