Back to index

plone3  3.1.7
events.py
Go to the documentation of this file.
00001 from zope.app.cache.interfaces.ram import IRAMCache
00002 from zope.component import adapter
00003 from zope.component import queryUtility
00004 from zope.interface import implements
00005 
00006 from plone.app.controlpanel.interfaces import IConfigurationChangedEvent
00007 
00008 class ConfigurationChangedEvent(object):
00009     implements(IConfigurationChangedEvent)
00010 
00011     def __init__(self, context, data):
00012         self.context = context
00013         self.data = data
00014 
00015 
00016 @adapter(IConfigurationChangedEvent)
00017 def handleConfigurationChangedEvent(event):
00018     util = queryUtility(IRAMCache)
00019     if util is not None:
00020         util.invalidateAll()