[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/Caching - ICache.py:1.4

Albertas Agejevas alga@codeworks.lt
Mon, 25 Nov 2002 08:48:36 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/Caching
In directory cvs.zope.org:/tmp/cvs-serv25234/Caching

Modified Files:
	ICache.py 
Log Message:
Cleaned up the RAMCache.

Removed all the references to Request from RAMCache, removed 'view' parameters
from the ICache interface.


=== Zope3/lib/python/Zope/App/Caching/ICache.py 1.3 => 1.4 ===
--- Zope3/lib/python/Zope/App/Caching/ICache.py:1.3	Thu Oct 31 11:01:39 2002
+++ Zope3/lib/python/Zope/App/Caching/ICache.py	Mon Nov 25 08:48:06 2002
@@ -19,25 +19,22 @@
 class ICache(Interface):
     """Interface for caches."""
 
-    def invalidate(ob, view_name=None, keywords=None):
+    def invalidate(ob, key=None):
         """Invalidates cached entries that apply to the given object.
 
-        If view_name is specified, only invalidates entries for that
-        view.  If keywords is also specified, only invalidates entries
-        for that view and given keywords.  Otherwise, if view_name is
-        None, invalidates all entries for the object.
+        ob is an object location.  If key is specified, only
+        invalidates entry for the given key.  Otherwise invalidates
+        all entries for the object.
         """
 
-    def query(ob, view_name="", keywords=None, default=None):
+    def query(ob, key=None, default=None):
         """Returns the cached data previously stored by set().
 
-        ob is the content object from which the object ID, modification
-        times, and acquisition context are usually determined. view_name is
-        the name of the view or method used to display the content object.
-        keywords is a set of filtered keywords and values which should all
-        be used to select a cache entry. 
+        ob is the location of the content object being cached.  key is
+        a mapping of keywords and values which should all be used to
+        select a cache entry.
         """
 
-    def set(data, ob, view_name="", keywords=None):
+    def set(data, ob, key=None):
         """Stores the result of executing an operation."""