Zope Interfaces¶
Products.mcdutils.interfaces.ISessionDataContainer
¶
- interface Products.mcdutils.interfaces.ISessionDataContainer¶
Document the implied interface expected by Zope’s SessionDataManager.
- get(key)¶
Return a mapping for ‘key’.
o Return None of no mapping exists.
o If not None, the returned object must be Acquisition-wrappable.
- has_key(key)¶
Return True if the container has the key, else False.
- new_or_existing(key)¶
Return a mapping for ‘key’, creating it if needed.
o The returned object must be Acquisition-wrappable.
Products.mcdutils.interfaces.IMemCacheMapping
¶
- interface Products.mcdutils.interfaces.IMemCacheMapping¶
Extends:
transaction.interfaces.ISavepointDataManager
Combine Python’s mapping protocol with transaction management.
Products.mcdutils.interfaces.IMemCacheProxy
¶
- 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.
- client¶
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.
- get(key)¶
Return the value stored in the cache under ‘key’.
- get_multi(keys)¶
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.
- servers¶
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.
Products.mcdutils.interfaces.IMemCacheSessionDataContainer
¶
- interface Products.mcdutils.interfaces.IMemCacheSessionDataContainer¶
Extends:
Products.mcdutils.interfaces.ISessionDataContainer
memcache-specific SDC, using a proxy.
- proxy_path¶
Path to proxy.
No session operations are possible if the path is invalid.
Products.mcdutils.interfaces.IZCache
¶
- 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’.
- ZCache_invalidate(ob)¶
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.