[Zope3-checkins] CVS: Zope3/src/zope/app/cache - annotationcacheable.py:1.2.26.1 ram.py:1.5.10.1

Grégoire Weber zope@i-con.ch
Sun, 22 Jun 2003 10:24:26 -0400


Update of /cvs-repository/Zope3/src/zope/app/cache
In directory cvs.zope.org:/tmp/cvs-serv24874/src/zope/app/cache

Modified Files:
      Tag: cw-mail-branch
	annotationcacheable.py ram.py 
Log Message:
Synced up with HEAD

=== Zope3/src/zope/app/cache/annotationcacheable.py 1.2 => 1.2.26.1 ===
--- Zope3/src/zope/app/cache/annotationcacheable.py:1.2	Wed Dec 25 09:12:44 2002
+++ Zope3/src/zope/app/cache/annotationcacheable.py	Sun Jun 22 10:22:53 2003
@@ -16,13 +16,14 @@
 from zope.component import getAdapter, getService
 from zope.app.interfaces.annotation import IAnnotations
 from zope.app.interfaces.cache.cache import ICacheable
+from zope.interface import implements
 
 annotation_key = 'zope.app.cache.CacheManager'
 
 class AnnotationCacheable:
     """Stores cache information in object's annotations."""
 
-    __implements__ = ICacheable
+    implements(ICacheable)
 
     def __init__(self, context):
         self._context = context


=== Zope3/src/zope/app/cache/ram.py 1.5 => 1.5.10.1 ===
--- Zope3/src/zope/app/cache/ram.py:1.5	Thu May  1 15:35:06 2003
+++ Zope3/src/zope/app/cache/ram.py	Sun Jun 22 10:22:53 2003
@@ -24,8 +24,8 @@
 
 from zope.app.interfaces.cache.ram import IRAMCache
 from zope.app.interfaces.event import IObjectModifiedEvent
-from zope.app.interfaces.services.configuration import \
-     IAttributeUseConfigurable
+from zope.app.interfaces.services.registration import IAttributeRegisterable
+from zope.interface import implements
 
 # A global caches dictionary shared between threads
 caches = {}
@@ -55,7 +55,7 @@
     handle their blocking internally.
     """
 
-    __implements__ = (IRAMCache, IAttributeUseConfigurable)
+    implements(IRAMCache, IAttributeRegisterable)
 
     def __init__(self):
 
@@ -83,7 +83,6 @@
         return s.getStatistics()
 
     def update(self,  maxEntries=None, maxAge=None, cleanupInterval=None):
-
         if maxEntries is not None:
             self.maxEntries = maxEntries
 
@@ -95,7 +94,6 @@
 
         self._getStorage().update(maxEntries, maxAge, cleanupInterval)
 
-
     def invalidate(self, ob, key=None):
         s = self._getStorage()
         if key:
@@ -104,12 +102,10 @@
         else:
             s.invalidate(ob)
 
-
     def invalidateAll(self):
         s = self._getStorage()
         s.invalidateAll()
 
-
     def query(self, ob, key=None, default=None):
         s = self._getStorage()
         key = self._buildKey(key)
@@ -184,7 +180,7 @@
         self.lastCleanup = time()
 
     def update(self, maxEntries=None, maxAge=None, cleanupInterval=None):
-        """Set the configuration options.
+        """Set the registration options.
 
         None values are ignored.
         """
@@ -268,7 +264,6 @@
         else:
             self._invalidate_queue.append((ob,key))
 
-
     def invalidateAll(self):
         """Drop all the cached values.
         """
@@ -279,7 +274,6 @@
             self._invalidate_queue = []
         finally:
             self.writelock.release()
-
 
     def removeStaleEntries(self):
         "Remove the entries older than maxAge"