[Checkins] SVN: Products.StandardCacheManagers/trunk/ Reorg and cleanup
Hanno Schlichting
hannosch at hannosch.eu
Sun Jul 11 14:12:20 EDT 2010
Log message for revision 114611:
Reorg and cleanup
Changed:
U Products.StandardCacheManagers/trunk/README.txt
U Products.StandardCacheManagers/trunk/setup.py
U Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/AcceleratedHTTPCacheManager.py
D Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/RAMCacheManager-internals.txt
U Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/RAMCacheManager.py
U Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/__init__.py
U Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/tests/__init__.py
U Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/tests/test_AcceleratedHTTPCacheManager.py
U Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/tests/test_CacheManagerLocation.py
D Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/version.txt
-=-
Modified: Products.StandardCacheManagers/trunk/README.txt
===================================================================
--- Products.StandardCacheManagers/trunk/README.txt 2010-07-11 18:07:52 UTC (rev 114610)
+++ Products.StandardCacheManagers/trunk/README.txt 2010-07-11 18:12:20 UTC (rev 114611)
@@ -1,4 +1,51 @@
Overview
========
+This package provides two cache managers for Zope 2. 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.
Modified: Products.StandardCacheManagers/trunk/setup.py
===================================================================
--- Products.StandardCacheManagers/trunk/setup.py 2010-07-11 18:07:52 UTC (rev 114610)
+++ Products.StandardCacheManagers/trunk/setup.py 2010-07-11 18:12:20 UTC (rev 114611)
@@ -18,7 +18,7 @@
version = '2.13.0dev',
url='http://pypi.python.org/pypi/Products.StandardCacheManagers',
license='ZPL 2.1',
- description="",
+ description="Cache managers for Zope 2.",
author='Zope Foundation and Contributors',
author_email='zope-dev at zope.org',
long_description=open('README.txt').read() + '\n' +
Modified: Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/AcceleratedHTTPCacheManager.py
===================================================================
--- Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/AcceleratedHTTPCacheManager.py 2010-07-11 18:07:52 UTC (rev 114610)
+++ Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/AcceleratedHTTPCacheManager.py 2010-07-11 18:12:20 UTC (rev 114611)
@@ -14,9 +14,8 @@
Accelerated HTTP cache manager --
Adds caching headers to the response so that downstream caches will
cache according to a common policy.
-
-$Id$
'''
+
from cgi import escape
import httplib
import logging
Deleted: Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/RAMCacheManager-internals.txt
===================================================================
--- Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/RAMCacheManager-internals.txt 2010-07-11 18:07:52 UTC (rev 114610)
+++ Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/RAMCacheManager-internals.txt 2010-07-11 18:12:20 UTC (rev 114611)
@@ -1,51 +0,0 @@
-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$
-
-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.
Modified: Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/RAMCacheManager.py
===================================================================
--- Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/RAMCacheManager.py 2010-07-11 18:07:52 UTC (rev 114610)
+++ Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/RAMCacheManager.py 2010-07-11 18:12:20 UTC (rev 114611)
@@ -13,8 +13,6 @@
'''
RAM cache manager --
Caches the results of method calls in RAM.
-
-$Id$
'''
from cgi import escape
from thread import allocate_lock
Modified: Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/__init__.py
===================================================================
--- Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/__init__.py 2010-07-11 18:07:52 UTC (rev 114610)
+++ Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/__init__.py 2010-07-11 18:12:20 UTC (rev 114611)
@@ -11,9 +11,7 @@
#
##############################################################################
'''
-Some standard Zope cache managers from Digital Creations.
-
-$Id$
+Some standard Zope cache managers.
'''
import RAMCacheManager
Modified: Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/tests/__init__.py
===================================================================
--- Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/tests/__init__.py 2010-07-11 18:07:52 UTC (rev 114610)
+++ Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/tests/__init__.py 2010-07-11 18:12:20 UTC (rev 114611)
@@ -12,6 +12,4 @@
#
##############################################################################
""" Unit tests for StandardCacheManagers product.
-
-$Id$
"""
Modified: Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/tests/test_AcceleratedHTTPCacheManager.py
===================================================================
--- Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/tests/test_AcceleratedHTTPCacheManager.py 2010-07-11 18:07:52 UTC (rev 114610)
+++ Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/tests/test_AcceleratedHTTPCacheManager.py 2010-07-11 18:12:20 UTC (rev 114611)
@@ -12,8 +12,6 @@
#
##############################################################################
""" Unit tests for AcceleratedCacheManager module.
-
-$Id$
"""
import unittest
@@ -148,7 +146,3 @@
suite.addTest(unittest.makeSuite(AcceleratedHTTPCacheTests))
suite.addTest(unittest.makeSuite(CacheManagerTests))
return suite
-
-if __name__ == '__main__':
- unittest.main(defaultTest='test_suite')
-
Modified: Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/tests/test_CacheManagerLocation.py
===================================================================
--- Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/tests/test_CacheManagerLocation.py 2010-07-11 18:07:52 UTC (rev 114610)
+++ Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/tests/test_CacheManagerLocation.py 2010-07-11 18:12:20 UTC (rev 114611)
@@ -12,8 +12,6 @@
#
##############################################################################
""" Unit tests for AcceleratedCacheManager module.
-
-$Id$
"""
import unittest
@@ -27,7 +25,6 @@
from AccessControl import SecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import noSecurityManager
-from OFS.Folder import Folder
from OFS.tests.testCopySupport import CopySupportTestBase
from OFS.tests.testCopySupport import UnitTestSecurityPolicy
from OFS.tests.testCopySupport import UnitTestUser
@@ -131,7 +128,3 @@
suite.addTest(unittest.makeSuite(AcceleratedHTTPCacheManagerLocationTests))
suite.addTest(unittest.makeSuite(RamCacheManagerLocationTests))
return suite
-
-if __name__ == '__main__':
- unittest.main(defaultTest='test_suite')
-
Deleted: Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/version.txt
===================================================================
--- Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/version.txt 2010-07-11 18:07:52 UTC (rev 114610)
+++ Products.StandardCacheManagers/trunk/src/Products/StandardCacheManagers/version.txt 2010-07-11 18:12:20 UTC (rev 114611)
@@ -1 +0,0 @@
-StandardCacheManagers-1-1-0
More information about the checkins
mailing list