module documentation

_cachemanager.py - Request-local caching helpers used across ZMS managers.

This module provides a tiny request buffer abstraction to avoid recomputing expensive values multiple times during a single HTTP request.

Key concepts:

  • Buff: A minimal attribute container stored on REQUEST['__buff__'].
  • ReqBuff: Mixin-style helper with methods to create, read, and clear namespaced cache entries.

Namespacing strategy:

  • Buffer keys are prefixed with the object's physical path (see ReqBuff.getReqBuffId) to avoid collisions between different objects using the same logical key.

Typical usage pattern:

  1. Try fetchReqBuff('some.key').
  2. On cache miss, compute the value.
  3. Persist it with storeReqBuff('some.key', value).
  4. Invalidate with clearReqBuff('some') when related state changes.

License: GNU General Public License v2 or later, Organization: ZMS Publishing

Class Buff Lightweight attribute container used for request-local buffering.
Class ReqBuff Request-scoped buffer helpers for expensive values computed during one request.