Forum OpenACS Q&A: Using template::paginator and flushing his cache

Request notifications

We have been triying to use the 'template::paginator' code with oacs 4.5 and the bboard.

It works ok.

Only a question.
How could us flush the caché of paginator when we send a new post and we want to see the new post at the moment?

Paginator 'caches' the full content of the query and it appears the caché last for all the session.

There exist any mean to force paginator to make the query again when we want?

We don't want to use the 'timeout' option. This is not valid for us.



Posted by Robert Locke on
Hi Jorge,

You should be able to flush the paginator cache via:

    cache flush <key>

where <key> is the name of your cache.

If you have multiple caches using that key as the base name (eg, for different sort orders), then you can use:

    cache flush <key>*

PS. Has anyone else noticed how slow posting has become recently?  It seems to take 20 to 30 seconds for me.

Posted by Robert Locke on
I forgot to mention that the default paginator cache timeout is 600 seconds as defined in acs-templating/tcl/0-procs.tcl.

PS. The previous post took 45 seconds.  Yikes!

Posted by Jeff Davis on
I am looking into the slow inserts in forums (I turned on developer support which unfortunately will make everything a little slow until I turn it off again).
Posted by Jorge Garcia on
Thanks, Robert.
The &#39;flush&#39; is working very well.