Chris, Yes, I've read your code, and am doing very much the same re initial page, rendering, metadata checks. The only additional steps I'm taking are to: 1) verify that the syntax actually still exists in the wiki 2) if not, then I'm removing (or at least clearing) the metadata flag so that I don't retry in the future The advantage of the above is that I "clean up" and return to a single cache for pages where the syntax has been removed. The disadvantage of the above is that I have an extra syntax verification every time. (But only where the metadata flag is still set.) Thank you--I think I am satisfied with the plugin's function for the present. If I get energetic, I may clean up the comments and post it somewhere. Thanks to all, Todd Augsburger todd@xxxxxxxxxxxxxxxx Roller Organs http://www.rollerorgans.com/ ----- Original Message ----- From: "Chris Smith" <chris@xxxxxxxxxxxxx> To: <dokuwiki@xxxxxxxxxxxxx> Sent: Thursday, January 11, 2007 10:54 AM Subject: [dokuwiki] Re: Content-dependent Purge/Cache I get around this by ensuring the syntax plugin component writes a metadata key to indicate its presence in the page. That is easy for the include plugin as there is a defined key - relation hasPart. A bigger problem is not knowing if that relation hasPart was put there by the include plugin of by something else. Take a look at the dublin core pages to see if there are any metadata keys which match your needs. If not, make one up. If you take a look at the code I provided a link to earlier, you'll see the first few lines in processing the event are to do with deciding whether or not "the plugin" has any interest in the page. I think the checks are: - is it a wiki page? - is it being rendered for xhtml (or whatever render modes the plugin supports). - is there a metadata key that the plugin recognises if any of these are failed the plugin exits immediately. the plugin then calculates the correct cache name and modifies the cache name on the cache object to the new name. DW's cache handling then determines whether or not to use it. You can also expire the cache there and then or add additional dependencies for DW to check (both of these facilities are used by the include plugin). Cheers, Chris -- DokuWiki mailing list - more info at http://wiki.splitbrain.org/wiki:mailinglist -- DokuWiki mailing list - more info at http://wiki.splitbrain.org/wiki:mailinglist