Package OFS :: Module Cache :: Class Cacheable
[show private | hide private]
[frames | no frames]

Class Cacheable

Known Subclasses:
ZopePageTemplate

Mix-in for cacheable objects.
Method Summary
  ZCacheable_configHTML(self)
Override to provide configuration of caching behavior that can only be specific to the cacheable object.
  ZCacheable_enabled(self)
Returns true if caching is enabled for this object or method.
  ZCacheable_get(self, view_name, keywords, mtime_func, default)
Retrieves the cached view for the object under the conditions specified by keywords.
  ZCacheable_getCache(self)
Gets the cache associated with this object.
  ZCacheable_getManager(self)
Returns the currently associated cache manager.
  ZCacheable_getManagerId(self)
Returns the id of the current ZCacheManager.
  ZCacheable_getManagerIds(self)
Returns a list of mappings containing the id and title of the available ZCacheManagers.
  ZCacheable_getManagerURL(self)
Returns the URL of the current ZCacheManager.
  ZCacheable_getModTime(self, mtime_func)
Returns the highest of the last mod times.
  ZCacheable_getObAndView(self, view_name)
If this object is a method of a ZClass and we're working with the primary view, uses the ZClass instance as ob and our own ID as the view_name.
  ZCacheable_invalidate(self, view_name, REQUEST)
Called after a cacheable object is edited.
  ZCacheable_isAMethod(self)
Returns 1 when this object is a ZClass method.
  ZCacheable_isCachingEnabled(self)
Returns true only if associated with a cache manager and caching of this method is enabled.
  ZCacheable_set(self, data, view_name, keywords, mtime_func)
Cacheable views should call this method after generating cacheable results.
  ZCacheable_setEnabled(self, enabled, REQUEST)
Changes the enabled flag.
  ZCacheable_setManagerId(self, manager_id, REQUEST)
Changes the manager_id for this object.

Class Variable Summary
tuple __ac_permissions__ = (('View management screens', ('ZCac...
Implements __implemented__ = <implementedBy OFS.Cache.Cacheable>
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...
tuple manage_options = ({'action': 'ZCacheable_manage', 'filte...
PermissionRole ZCacheable_configHTML__roles__ = <PermissionRole object ...
PermissionRole ZCacheable_enabled__roles__ = <PermissionRole object at ...
tuple ZCacheable_get__roles__ = ()
tuple ZCacheable_getCache__roles__ = ()
tuple ZCacheable_getManager__roles__ = ()
PermissionRole ZCacheable_getManagerId__roles__ = <PermissionRole objec...
PermissionRole ZCacheable_getManagerIds__roles__ = <PermissionRole obje...
PermissionRole ZCacheable_getManagerURL__roles__ = <PermissionRole obje...
tuple ZCacheable_getModTime__roles__ = ()
tuple ZCacheable_getObAndView__roles__ = ()
PermissionRole ZCacheable_invalidate__roles__ = <PermissionRole object ...
PermissionRole ZCacheable_isAMethod__roles__ = <PermissionRole object a...
tuple ZCacheable_isCachingEnabled__roles__ = ()
DTMLFile ZCacheable_manage = <App.special_dtml.DTMLFile object at...
PermissionRole ZCacheable_manage__roles__ = <PermissionRole object at 0...
tuple ZCacheable_set__roles__ = ()
PermissionRole ZCacheable_setEnabled__roles__ = <PermissionRole object ...
PermissionRole ZCacheable_setManagerId__roles__ = <PermissionRole objec...

Method Details

ZCacheable_configHTML(self)

Override to provide configuration of caching behavior that can only be specific to the cacheable object.

ZCacheable_enabled(self)

Returns true if caching is enabled for this object or method.

ZCacheable_get(self, view_name='', keywords=None, mtime_func=None, default=None)

Retrieves the cached view for the object under the conditions specified by keywords. If the value is not yet cached, returns the default.

ZCacheable_getCache(self)

Gets the cache associated with this object.

ZCacheable_getManager(self)

Returns the currently associated cache manager.

ZCacheable_getManagerId(self)

Returns the id of the current ZCacheManager.

ZCacheable_getManagerIds(self)

Returns a list of mappings containing the id and title of the available ZCacheManagers.

ZCacheable_getManagerURL(self)

Returns the URL of the current ZCacheManager.

ZCacheable_getModTime(self, mtime_func=None)

Returns the highest of the last mod times.

ZCacheable_getObAndView(self, view_name)

If this object is a method of a ZClass and we're working with the primary view, uses the ZClass instance as ob and our own ID as the view_name. Otherwise returns self and view_name unchanged.

ZCacheable_invalidate(self, view_name='', REQUEST=None)

Called after a cacheable object is edited. Causes all cache entries that apply to the view_name to be removed. Returns a status message.

ZCacheable_isAMethod(self)

Returns 1 when this object is a ZClass method.

ZCacheable_isCachingEnabled(self)

Returns true only if associated with a cache manager and caching of this method is enabled.

ZCacheable_set(self, data, view_name='', keywords=None, mtime_func=None)

Cacheable views should call this method after generating cacheable results. The data argument can be of any Python type.

ZCacheable_setEnabled(self, enabled=0, REQUEST=None)

Changes the enabled flag. Normally used only when setting up cacheable ZClass methods.

ZCacheable_setManagerId(self, manager_id, REQUEST=None)

Changes the manager_id for this object.

Class Variable Details

__ac_permissions__

Type:
tuple
Value:
(('View management screens',
  ('ZCacheable_manage',
   'ZCacheable_invalidate',
   'ZCacheable_enabled',
   'ZCacheable_getManagerId',
   'ZCacheable_getManagerIds',
   'ZCacheable_configHTML',
   'ZCacheable_isAMethod',
...                                                                    

__implemented__

Type:
Implements
Value:
<implementedBy OFS.Cache.Cacheable>                                    

__providedBy__

Type:
ClassProvides
Value:
<zope.interface.declarations.ClassProvides object at 0x2771a90>        

__provides__

Type:
ClassProvides
Value:
<zope.interface.declarations.ClassProvides object at 0x2771a90>        

manage_options

Type:
tuple
Value:
({'action': 'ZCacheable_manage',
  'filter': <function filterCacheTab at 0x15dc5f0>,
  'help': ('OFSP', 'Cacheable-properties.stx'),
  'label': 'Cache'},)                                                  

ZCacheable_configHTML__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x151cc08>                                   

ZCacheable_enabled__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x151cc08>                                   

ZCacheable_get__roles__

Type:
tuple
Value:
()                                                                     

ZCacheable_getCache__roles__

Type:
tuple
Value:
()                                                                     

ZCacheable_getManager__roles__

Type:
tuple
Value:
()                                                                     

ZCacheable_getManagerId__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x151cc08>                                   

ZCacheable_getManagerIds__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x151cc08>                                   

ZCacheable_getManagerURL__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x151cc08>                                   

ZCacheable_getModTime__roles__

Type:
tuple
Value:
()                                                                     

ZCacheable_getObAndView__roles__

Type:
tuple
Value:
()                                                                     

ZCacheable_invalidate__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x151cc08>                                   

ZCacheable_isAMethod__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x151cc08>                                   

ZCacheable_isCachingEnabled__roles__

Type:
tuple
Value:
()                                                                     

ZCacheable_manage

Type:
DTMLFile
Value:
<App.special_dtml.DTMLFile object at 0x15d5df0>                        

ZCacheable_manage__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x151cc08>                                   

ZCacheable_set__roles__

Type:
tuple
Value:
()                                                                     

ZCacheable_setEnabled__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x151cbc0>                                   

ZCacheable_setManagerId__roles__

Type:
PermissionRole
Value:
<PermissionRole object at 0x151cbc0>                                   

Generated by Epydoc 2.1 on Thu Aug 16 09:55:12 2007 http://epydoc.sf.net