class documentation
class ReqBuff(object): (source)
Request-scoped buffer helpers for expensive values computed during one request.
| Method | clear |
Remove buffered entries from the current request, optionally filtered by prefix. |
| Method | fetch |
Fetch one buffered value from the current request (raises if missing). |
| Method | get |
Return a stable request-buffer key namespaced by the object's physical path. |
| Method | store |
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. |
Remove buffered entries from the current request, optionally filtered by prefix.
| Parameters | |
| prefix:str | Optional prefix to filter buffer keys. |
| REQUEST:object | Optional request object. |
Fetch one buffered value from the current request (raises if missing).
| Parameters | |
| key:str | Buffer key (namespaced by physical path). |
| REQUEST | Undocumented |
| Returns | |
| object | The buffered value. |
Return a stable request-buffer key namespaced by the object's physical path.
| Parameters | |
| key:str | Buffer key (namespaced by physical path). |
| Returns | |
| str | Namespaced buffer key. |
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:str | Buffer key (namespaced by physical path). |
| value:object | Value to store in the buffer. |
| REQUEST | Undocumented |
| Returns | |
| object | The value that was stored. |