[dokuwiki] Re: A question about caching in DokuWiki

  • From: <sf-dev@xxxxxxxxxxxxx>
  • To: dokuwiki <dokuwiki@xxxxxxxxxxxxx>
  • Date: Thu, 28 Apr 2011 19:10:39 +0200

Excerpts from Chris G's message of Sun Apr 24 16:56:03 +0200 2011:
> I find DokuWiki's caching a nuisance 99% of the time, I use DokuWiki as
> a personal Wiki on my own desktop computer so there's only ever one user
> nearly all of the time and I don't really believe the caching does
> anything for me.
> 
> What it *does* do is get in the way a lot of the time when I'm
> developing things, especially when developing plugins as I keep having
> to edit pages (add a space, delete a space, add a page) to force it to
> run the plugin handle() function.
> 
> ~~NOCACHE~~ doesn't seem to influence whether the handle() function is
> called, if the page content isn't changed then handle() isn't called
> regardless of whether there's a ~~NOCACHE~~ or not.

You could check the outcome of your plugins using preview. Plugins and
Templates are supposed to give the same result. Also it keeps the history 
clean and like cache it saves io, cpu and time and thus might eg save the 
planet someday.

> I also find it difficult when pages have 'dynamic' content, e.g. in my
> case parameters are passed so that the same page is rendered with
> different values in it.  You have to be very careful where a plugin uses
> the passed paramters.

I guess you already read about http://www.dokuwiki.org/devel:caching.
For dyncamic parameters maybe you want to hook to ACTION_ACT_PREPROCESS
and do the parsing in handle_act_preprocess( ). Then you should be able
to adjust caching based on the input.

besides ... every time I find myself bruteforcing with shift+refresh and 
?purge=1 at my webserver it was not the caches fault.

happy hacking :)
-- 
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: