collective.redismemoize

collective.redismemoize#

collective.redismemoize stores the values of plone.memoize's RAM cache in Redis or Valkey, so every Plone instance that talks to the same server shares them. Values that are not plain data, such as content objects, utilities, or anything holding a database connection, stay in each process's own RAM cache, exactly where stock Plone keeps them.

Install it, set one environment variable, and every @ram.cache function in Plone and in your add-ons goes through it. Without that variable, the package changes nothing.

When to use it#

Use it when you run several Plone instances behind a load balancer, and each instance computes the same cached values on its own. A shared cache means one instance computes a value and the others reuse it, and a new instance starts warm.

When not to use it#

Do not use it for a single instance: the RAM cache is faster than any network round trip. Do not use it to share values whose cache key leaves out something that differs between instances. When not to use it explains both cases.

Where to start#

🎓 Tutorials

See it work in fifteen minutes: share a cache between two instances on your computer.

Tutorials
🛠️ How-to guides

Install, configure, monitor, invalidate, and test your add-on against Redis.

How-to guides
💡 Concepts

What the package shares, what it refuses, and why it fails safe.

Concepts
📖 Reference

Environment variables, REST API, Python API, ZCML, and log messages.

Reference