Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
4a1caafd
Commit
4a1caafd
authored
Oct 11, 2002
by
Albertas Agejevas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some internals documentation which could be useful for maintainers
parent
e564a047
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
0 deletions
+51
-0
lib/python/Products/StandardCacheManagers/RAMCacheManager-internals.txt
...ducts/StandardCacheManagers/RAMCacheManager-internals.txt
+51
-0
No files found.
lib/python/Products/StandardCacheManagers/RAMCacheManager-internals.txt
0 → 100644
View file @
4a1caafd
Preface
=======
This document is intended for people interested in the internals of
RAMCacheManager, such as maintainers. It should be updated when any
significant changes are made to the RAMCacheManager.
$Id: RAMCacheManager-internals.txt,v 1.1 2002/10/11 11:51:28 alga Exp $
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.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment