Question is, what is view_name supposed to do during

In OFS.Cache.Cacheable we have:

    def 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.
        c = self.ZCacheable_getCache()
        if c is not None:
            ob, view_name = self.ZCacheable_getObAndView(view_name)
                message = c.ZCache_invalidate(ob)


    def ZCacheable_getObAndView(self, view_name):
        ob = self
        if not view_name and self.ZCacheable_isAMethod():
            # This is a ZClass method.
            ob = aq_parent(aq_inner(self))
            if isCacheable(ob):
                view_name = self.getId()
                # Both the parent and the child have to be
                # cacheable.
                ob = self
        return ob, view_name

As far as I understand this, 'view_name' is useless here, and
invalidation always occurs for all cache keys associated with object
'ob'. But this is not what docstring for ZCacheable_invalidate says.
Seems strange but maybe I've missed something here?

Maciej Wisniowski

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to