Skip to main content
https://github.com/zopefoundation/Products.StandardCacheManagers/actions/workflows/tests.yml/badge.svg https://coveralls.io/repos/github/zopefoundation/Products.StandardCacheManagers/badge.svg?branch=master Current version on PyPI Supported Python versions

Overview

This package provides two cache managers for Zope. A RAMCacheManager and an Accelerated HTTP cache manager, which adds HTTP cache headers to responses.

The following is intended for people interested in the internals of RAMCacheManager, such as maintainers.

Introduction

The caching framework does not interpret the data in any way, it acts just as a general storage for data passed to it. It tries to check if the data is pickleable though. IOW, only pickleable data is cacheable.

The idea behind the RAMCacheManager is that it should be shared between threads, so that the same objects are not cached in each thread. This is achieved by storing the cache data structure itself as a module level variable (RAMCacheManager.caches). This, of course, requires locking on modifications of that data structure.

Each RAMCacheManager instance has one cache in RAMCacheManager.caches dictionary. A unique __cacheid is generated when creating a cache manager and it’s used as a key for caches.

Object Hierarchy

RAMCacheManager
RAMCache
ObjectCacheEntries

CacheEntry

RAMCacheManager is a persistent placeful object. It is assigned a unique __cacheid on its creation. It is then used as a key to look up the corresponding RAMCache object in the global caches dictionary. So, each RAMCacheManager has a single RAMCache related to it.

RAMCache is a volatile cache, unique for each RAMCacheManager. It is shared among threads and does all the locking. It has a writelock. No locking is done on reading though. RAMCache keeps a dictionary of ObjectCacheEntries indexed by the physical path of a cached object.

ObjectCacheEntries is a container for cached values for a single object. The values in it are indexed by a tuple of a view_name, interesting request variables, and extra keywords passed to Cache.ZCache_set().

CacheEntry is a wrapper around a single cached value. It stores the data itself, creation time, view_name and keeps the access count.

Changelog

6.1 (2025-11-19)

  • Fix release to include package data files.

6.0 (2025-11-19)

  • Switch to PEP 420 native namespace.

  • Add support for Python 3.12, 3.13 and 3.14.

  • Drop support for Python 3.7, 3.8 and 3.9.

5.0 (2023-02-01)

  • Drop support for Python 2.7, 3.5, 3.6.

4.2 (2022-12-16)

  • Fix insidious buildout configuration bug for tests against Zope 4.

  • Add support for Python 3.10 and 3.11.

4.1.1 (2021-07-02)

  • fix DeprecationWarning for rfc1123_date (#8)

4.1.0 (2021-03-16)

  • Add support for Python 3.9.

4.0.3 (2019-10-14)

  • More package cleanups.

  • Cleaned up ZMI views for Zope 4.

  • Fixed several errors due to changed behavior in Python 3.

  • Update isort to version 5.

4.0.2 (2019-02-17)

  • Specify supported Python versions using python_requires in setup.py

  • Added support for Python 3.7 and 3.8

  • Dropped support for Python 3.4 as Zope does not support it anymore

  • More PEP8 compliance.

4.0.1 (2017-05-23)

  • Move version dependency to a released version of Zope

4.0.0 (2017-05-13)

  • Require Zope 4.

  • Python 3-compatibility

3.0 (2016-07-18)

  • Remove HelpSys support.

2.13.1 (2014-09-14)

  • Prevent warnings when RAM caching in a context without a Request.

2.13.0 (2010-07-11)

  • Released as separate package.

Release files for Products.StandardCacheManagers 6.1

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

Source distribution (sdist)

Source distribution for Products.StandardCacheManagers 6.1
File Size Uploaded
products_standardcachemanagers-6.1.tar.gz 20.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Products.StandardCacheManagers 6.1
File Interpreter ABI Platform
products_standardcachemanagers-6.1-py3-none-any.whl Python 3 none any Details

Total release size: 45.1 kB

Release files / products_standardcachemanagers-6.1.tar.gz

Download URL products_standardcachemanagers-6.1.tar.gz
Size 20.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d58605343a9cc45f6e0669f66d4862d01ac9cb1f3a355604d76e5b40757bc01d
BLAKE2b-256 checksum
How to use checksums
21b43440193ff1e3a5300c60ab433945b63571850d3ed169b3d618beee406183
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / products_standardcachemanagers-6.1-py3-none-any.whl

Download URL products_standardcachemanagers-6.1-py3-none-any.whl
Size 24.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
86d97e33f3af3bbcd2fb367a96debed6031631525c5b4254acb2b6b173ff59a3
BLAKE2b-256 checksum
How to use checksums
431c80b2755657e84bddd21fe79aea6f41ac41f4f04490f118c3d01580bab417
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

6.1 This release

2 release files

6.0

2 release files

5.0

2 release files

4.2

2 release files

4.1.1

2 release files

4.1.0

2 release files

4.0.3

2 release files

4.0.2

2 release files

4.0.1

1 release file

4.0.0

1 release file

3.0

1 release file

2.13.1

1 release file

2.13.0

1 release file

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