cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Corin Moss" <>
Subject Using getTransfomerValidity with a source based key for cache invalidating
Date Thu, 12 Feb 2004 09:39:17 GMT
Hi Guys,

I've been implementing the external cache validity functionality of
DBPrism, and I've decided that I want to externally invalidate my
transformers as well.  I can see that getValidity within (for example)
TraxTransformer will be fairly easy to implement with an external
validity, but what I'd also like to do is create a key based on values
contained within the input source for the transformation.   In this case
a series of record ids.  I can't rely on a hash, as I need to be able to
selectively clear the cache given a single valid id.

As far as I can tell, TraxTranformer's getKey method uses the URI of the
inputSource as the basis for a key (including params of course.)  Has
anyone tried modifying this to analyse the _content_ of the input
document? And if you have, do you have any tips for me?  I have a
horrible feeling that the performance cost of analysing the input
document is going to be greater than the gains ;)  I can easily write
some xpath to concatenate all record ids within an input document, and
then clear the cache based on any one of those ideas, but I'm sure
there's a smarter idea :)

I'd appreciate any feedback you may have.



Corin Moss
Lead Developer
TVNZ Interactive

+64 9 916 7367
+64 21 403 054

View raw message