[dokuwiki] Re: preventing instruction level caching

  • From: Michael Klier <chi@xxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Wed, 29 Apr 2009 11:25:00 +0200

On Wed, Apr 29, 2009 at 09:14:18PM +1200, James Lin wrote:
> 
> 
>     You're providing not enough context. Sorry, but I have no idea what you're
>     talking about. What are you trying to "solve", where did you find sth. in
>     the
>     indexmenu plugin etc. pp...
> 
> 
> OK, I have written an action plugin which appends some custom wiki text which
> contains the indexmenu plugin syntax on page load, so an index menu shows up 
> on
> every page automatically, it also detects that if the page is being included,
> it won't append the custom wiki text to the sub page, so only displays 1 index
> menu.
> 
> everything works fine, except our main page has a blog plugin, as you know the
> blog main page includes all the blog entries which uses the include plugin
> helper. When I view the main blog page, it caches all the blog entry pages due
> to inclusion, so when I view an particular blog entry, it picks up the content
> from the cache which doesn't have the custom wiki text(index menu).

I see, I get the feeling that you approached you're problem from the wrong
angle. Which event are you using in your action plugin? 

If I were you I'd used either TPL_ACT_RENDER or TPL_CONTENT_DISPLAY, because in
those two you can modify the actual page XHTML without the cache getting in
your way at all. Rendering just one piece of plugin syntax could be done using
p_render(), in your case the syntax of the indexmenu.

HTH,
        Chi

-- 
Michael Klier

www:    http://www.chimeric.de
jabber: chi@xxxxxxxxxxxxxxxxxx
key:    http://downloads.chimeric.de/chi.asc
key-id: 0x8308F551

Other related posts: