class documentation

class ReqBuff(object): (source)

View In Hierarchy

Request-scoped buffer helpers for expensive values computed during one request.

Method clearReqBuff Remove buffered entries from the current request, optionally filtered by prefix.
Method fetchReqBuff Fetch one buffered value from the current request (raises if missing).
Method getReqBuffId Return a stable request-buffer key namespaced by the object's physical path.
Method storeReqBuff Store and return a value in the current request buffer. The value is stored under a key namespaced by the object's physical path to avoid conflicts with other objects.
def clearReqBuff(self, prefix='', REQUEST=None): (source)

Remove buffered entries from the current request, optionally filtered by prefix.

Parameters
prefix:strOptional prefix to filter buffer keys.
REQUEST:objectOptional request object.
def fetchReqBuff(self, key=None, REQUEST=None): (source)

Fetch one buffered value from the current request (raises if missing).

Parameters
key:strBuffer key (namespaced by physical path).
REQUESTUndocumented
Returns
objectThe buffered value.
def getReqBuffId(self, key): (source)

Return a stable request-buffer key namespaced by the object's physical path.

Parameters
key:strBuffer key (namespaced by physical path).
Returns
strNamespaced buffer key.
def storeReqBuff(self, key, value, REQUEST=None): (source)

Store and return a value in the current request buffer. The value is stored under a key namespaced by the object's physical path to avoid conflicts with other objects.

Parameters
key:strBuffer key (namespaced by physical path).
value:objectValue to store in the buffer.
REQUESTUndocumented
Returns
objectThe value that was stored.