[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Services/CachingService - CachingService.py:1.2
Albertas Agejevas
alga@codeworks.lt
Fri, 6 Dec 2002 06:01:13 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Services/CachingService
In directory cvs.zope.org:/tmp/cvs-serv16711/lib/python/Zope/App/OFS/Services/CachingService
Modified Files:
CachingService.py
Log Message:
Made CachingService an EventChannel.
=== Zope3/lib/python/Zope/App/OFS/Services/CachingService/CachingService.py 1.1 => 1.2 ===
--- Zope3/lib/python/Zope/App/OFS/Services/CachingService/CachingService.py:1.1 Thu Oct 3 07:56:33 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/CachingService/CachingService.py Fri Dec 6 06:01:11 2002
@@ -23,24 +23,26 @@
from Zope.App.OFS.Container.IContainer import IHomogenousContainer, IContainer
from Zope.App.OFS.Container.BTreeContainer import BTreeContainer
+from Zope.Event.IEventChannel import IEventChannel
+from Zope.Event.EventChannel import EventChannel
+
from Zope.App.Caching.ICachingService import ICachingService
from Zope.App.Caching.ICache import ICache
+
class ILocalCachingService(ICachingService, IContainer,
- IHomogenousContainer):
+ IHomogenousContainer,
+ IEventChannel):
"""TTW manageable caching service"""
-class CachingService(BTreeContainer):
-
- __implements__ = ILocalCachingService
+class CachingService(BTreeContainer, EventChannel):
- ############################################################
- # Implementation methods for interface
- # Zope.App.OFS.Services.CachingService.ILocalCachingService
+ __implements__ = ILocalCachingService
- ######################################
- # from: Zope.App.Caching.ICachingService.ICachingService
+ def __init__(self):
+ BTreeContainer.__init__(self)
+ EventChannel.__init__(self)
def getCache(self, name):
'See Zope.App.Caching.ICachingService.ICachingService'
@@ -60,12 +62,8 @@
if service is not None:
caches.append(service.getAvailableCaches())
return caches
-
getAvailableCaches = ContextMethod(getAvailableCaches)
- ######################################
- # from: Zope.App.OFS.Container.IContainer.IHomogenousContainer
-
def isAddable(self, interfaces):
'See Zope.App.OFS.Container.IContainer.IHomogenousContainer'
if type(interfaces) != TupleType:
@@ -73,6 +71,3 @@
if ICache in interfaces:
return 1
return 0
-
- #
- ############################################################