Module
zope.app.cache.ram

RAM Cache

The design of this class is heavily based on RAMCacheManager in Zope2.

The idea behind the RAMCache 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 (RAMCache.caches). This, of course, requires locking on modifications of that data structure.

RAMCache is a persistent object. The actual data storage is a volatile object, which can be acquired/created by calling _getStorage(). Storage objects are shared between threads and handle their blocking internally. RAM cache implementation.