[dokuwiki] Remove a page from the cache

  • From: lilive <lilivve@xxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Mon, 23 Nov 2009 21:50:16 +0100

Hi,

First, thanks a lot for this great tool and to share this big work :)

And sorry for my english, I'm just a french...

To be short, my question is :
Is it a way to purge the cache for a given page, from the handle method of a syntax plugin ? (the page to remove from the cache is not the page for which the handle method is called)

To be long, here's some details :

I'm working on a wiki (dokuwiki one, of course) for actionscript developpers. It's my first php experience, and the whole dokuwiki program is a little bit complicated for me to understand.

I made a custom version of the data plugin. For example, you can see it in action here :
http://wikibis.mediabox.fr/tutoriaux/flash/programmation/generalites
(This is a devel state, the wiki isn't fully functionnal, and must not be use yet)

As you can see, I use data plugin to make nice summaries.
It work like this :
Each content page has a "category" key. This key can have multiples values. Each value is like a namespace.
For example :

---- dataentry ----
category : animal:cat, hunter:mouse
----

Then, this page is visible in 2 summaries pages. A summary page "animal:cat", which presents all the pages about cats :

---- datatable ----
filter : category=animal:cat
...
----

and a summary, at "hunter:mouse", which presents all the pages about mouses hunters :

---- datatable ----
filter : category=hunter:mouse
...
----

My problem is that the SQL data base is quite big. A single request, for datatable generation, takes more than 6 seconds. I don't want users to wait so much each time they want to display a summary.

The datatable render method specify :
$renderer->info['cache'] = false;

Of course, because changes may occurs in the database since the last render operation.

I would like to remove this line.
I think it could be a good idea that a page with a datatable stay in the cache, until a corresponding dataentry changes. For example, the "animal:cat" page may stay in the cache, until a dataentry with a
category : animal:cat
was created or deleted.

That's why I'm looking for a way to remove a page from the cache, in the handle method of the dataentry class.

I hope I'm clear enougth :)
Thank you to read me, and perhaps to answer me,


Olivier Tarasse.




--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: