Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

collective.redismemoize

PyPI PyPI - Python Version PyPI - License PyPI - Plone Versions CI

Redis-backed storage for plone.memoize, shared across Plone instances, that keeps the values Redis can't safely store in each process's RAM cache.

Every Plone instance keeps its own plone.memoize RAM cache, so behind a load balancer each one computes the same cached values on its own, and a new instance starts cold. collective.redismemoize stores those values in Redis or Valkey instead, where every instance reads them. Values that are not plain data, such as content objects or anything holding a database connection, stay in the RAM cache, exactly where stock Plone keeps them.

📖 Documentation: https://collective.github.io/collective.redismemoize/

Features

  • ✅ Works for every @ram.cache function in Plone and in your add-ons, without changing them.
  • 🔀 Routes each function on its own: plain data goes to Redis, anything else stays in RAM, and the reason is logged once.
  • 🔒 Reads values back with a restricted unpickler that resolves only the classes plain data needs, so a write to Redis cannot run code in Plone.
  • 🛟 Fails safe: when Redis is slow or down, a circuit breaker keeps every instance on its RAM cache until Redis answers again.
  • 🎯 Include and exclude functions by pattern, and give your own functions their own TTL.
  • 📊 A Manager-only @redismemoize REST API endpoint reports the status, routes and counters, and invalidates values after a deploy.
  • 🧪 A test layer for add-ons, backed by fakeredis, to check that what your functions cache is shareable.
  • 🔁 Tested against Redis 7 and Valkey 8.

Without configuration, the package changes nothing.

Installation

Add collective.redismemoize to the dependencies of your Plone project, and install it. With plone.autoinclude, the default in Plone 6, there is nothing else to load and no add-on to activate.

Then set one environment variable on every instance:

REDIS_MEMOIZE_URL=redis://redis:6379/0

Run Redis as a cache, on a private network: persistence off, a memory limit, and allkeys-lru eviction. The configuration guide has a Docker Compose example, and the configuration reference lists every variable.

Compatibility

Component Versions
Plone 6.1, 6.2
Python 3.10 to 3.14
Redis 4.0 and later; tested with 7.4
Valkey 7.2 and later; tested with 8

Contribute

You need uv, Make, Git, and Docker for the tests against real servers.

git clone git@github.com:collective/collective.redismemoize.git
cd collective.redismemoize
make install
make test

make test needs no container. make test-docker runs the tests against Redis and Valkey containers. make help lists every target.

License

The project is licensed under GPLv2.

Redis is a registered trademark of Redis Ltd. Any rights therein are reserved to Redis Ltd. Any use by this project is for referential purposes only and does not indicate any sponsorship, endorsement or affiliation between Redis and this project.


Changelog

1.0.0a1 (2026-10-19)

Feature

  • Initial implementation: plone.memoize RAM cache values are stored in Redis or Valkey and shared across Plone instances, while values that are not plain data stay in each process's RAM cache. Includes per-function routing, a circuit breaker, a restricted unpickler, environment-based configuration, a Manager-only @redismemoize REST API endpoint for status and invalidation, and a test layer for add-ons. @ericof

Metadata

Release files for collective.redismemoize 1.0.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for collective.redismemoize 1.0.0a1
File Size Uploaded Provenance
collective_redismemoize-1.0.0a1.tar.gz 213.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for collective.redismemoize 1.0.0a1
File Interpreter ABI Platform
collective_redismemoize-1.0.0a1-py3-none-any.whl Python 3 none any Details

Total release size: 245.0 kB

Release files / collective_redismemoize-1.0.0a1.tar.gz

Download URL collective_redismemoize-1.0.0a1.tar.gz
Size 213.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4dc0f214dc55e6f4da9957316d83016d6bdcbdec9362a23e2ec726d106e00040
BLAKE2b-256 checksum
How to use checksums
b34e2eab796ab8d9f0404f76ef86666739e59c7a9129fd722de7dabef2513126
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release files / collective_redismemoize-1.0.0a1-py3-none-any.whl

Download URL collective_redismemoize-1.0.0a1-py3-none-any.whl
Size 32.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c4eda14fbbc027b07a4b0124f61e6ba6ffcf925da0f7ab73f6f40824b6f80f48
BLAKE2b-256 checksum
How to use checksums
c54eb09e20cca1a63f8f4b2a19cb7135972ca063d0b3371e3235d2611fd5ca11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Security for collective.redismemoize 1.0.0a1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page