Florent Guillaume wrote:
> Jean-Marc, do you have any plans to switch to generic RAM Cache
> Managers for CPSSkins, instead of using custom ones?
> Is there something missing from RAMCacheManager that you'd like to
> have to use them ?
>
> I'd be much more comfortable if everyone used the standard framework.
> Which we can extend if needed.
>
> Florent
>
Hi!
I think it should be possible to move to ZCacheable (for CPSSkins, it's
no problem)
for CPSPortlets, it's more tricky:
it should work by using ZCacheable_get() and ZCacheable_set(), the
"keyword" is called "cache index" in CPSPortlets.
what I don't find though in ZCacheable is the information about when an
entry by keyword was last set in the cache, this is quite important for
the ZEO invalidation, in PortletRAMCache.py it's called:
def getLastCleanup(self, id=None):
"""Gets the last cleanup time"""
what seem to be missing too is a ZCacheable_delete() called by keyword,
I only see a ZCacheable_invalidate() which wipes out the entire cached
object. (In CPSPortlets, a same portlet is cached differently for
different users, and it is possible to invalidate some of the entries
without invalidate all the entries associated to the portlet).
So it seems to me that ZCacheable is less granular when it comes to
invalidation, the RAM cache in CPSPortlets works on a keyword level,
i.e. the different entries associated to a same portlet are completely
independent. Also there is no global timeout after which all entries in
the RAM cache of CPSPortlets are removed from the cache unless it's
explicitly set in the portlet's cache parameters.
the ram cache interface used is in CPSPortlets/PortletRAMCache.py
/JM
_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel