[Zope3-checkins] CVS: Zope3/src/zope/app/cache - ram.py:1.6

Steve Alexander steve@cat-box.net
Tue, 3 Jun 2003 11:45:11 -0400


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

Modified Files:
	ram.py 
Log Message:
Various formatting cleanup.
Use new implements() style.
replaced use of 0 and 1 with False and True.


=== Zope3/src/zope/app/cache/ram.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/cache/ram.py:1.5	Thu May  1 15:35:06 2003
+++ Zope3/src/zope/app/cache/ram.py	Tue Jun  3 11:45:11 2003
@@ -26,6 +26,7 @@
 from zope.app.interfaces.event import IObjectModifiedEvent
 from zope.app.interfaces.services.configuration import \
      IAttributeUseConfigurable
+from zope.interface import implements
 
 # A global caches dictionary shared between threads
 caches = {}
@@ -55,7 +56,7 @@
     handle their blocking internally.
     """
 
-    __implements__ = (IRAMCache, IAttributeUseConfigurable)
+    implements(IRAMCache, IAttributeUseConfigurable)
 
     def __init__(self):
 
@@ -83,7 +84,6 @@
         return s.getStatistics()
 
     def update(self,  maxEntries=None, maxAge=None, cleanupInterval=None):
-
         if maxEntries is not None:
             self.maxEntries = maxEntries
 
@@ -95,7 +95,6 @@
 
         self._getStorage().update(maxEntries, maxAge, cleanupInterval)
 
-
     def invalidate(self, ob, key=None):
         s = self._getStorage()
         if key:
@@ -104,12 +103,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)
@@ -268,7 +265,6 @@
         else:
             self._invalidate_queue.append((ob,key))
 
-
     def invalidateAll(self):
         """Drop all the cached values.
         """
@@ -279,7 +275,6 @@
             self._invalidate_queue = []
         finally:
             self.writelock.release()
-
 
     def removeStaleEntries(self):
         "Remove the entries older than maxAge"