[Zope3-checkins] CVS: Zope3/src/zope/app/cache - caching.py:1.4
Albertas Agejevas
alga@codeworks.lt
Wed, 19 Mar 2003 14:57:55 -0500
Update of /cvs-repository/Zope3/src/zope/app/cache
In directory cvs.zope.org:/tmp/cvs-serv11034/src/zope/app/cache
Modified Files:
caching.py
Log Message:
Renamed getPgysicalPathString() to getPath().
Got rid of getPhysicalPath() (which used to return a tuple) by replacing it
by getPath().
=== Zope3/src/zope/app/cache/caching.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/cache/caching.py:1.3 Sat Dec 28 09:13:22 2002
+++ Zope3/src/zope/app/cache/caching.py Wed Mar 19 14:57:23 2003
@@ -15,7 +15,7 @@
from zope.component import getAdapter, getService, ComponentLookupError
from zope.app.interfaces.cache.cache import ICacheable
-from zope.app.interfaces.traversing import IPhysicallyLocatable
+from zope.app.traversing import getPath
def getCacheForObj(obj):
@@ -30,7 +30,6 @@
def getLocationForCache(obj):
"""Returns the location to be used for caching the object or None."""
try:
- locatable = getAdapter(obj, IPhysicallyLocatable)
- return "/".join(locatable.getPhysicalPath())
+ return getPath(obj)
except (ComponentLookupError, TypeError):
return None