Forum OpenACS Development: How to disable caching temporarily

Collapse
Posted by xx xx on
Is there a more elegant way to disable caching temporarily than disabling all memoize-procs and restart the server? How do I flush everything in memory?

I think I sometimes need it when I want to make sure (when developing) that bugs are not due to cached information.

Collapse
Posted by Jeff Davis on
there is a util_memoize_flush_regexp function which you
could pass .* to flush it all.
Collapse
Posted by Caroline Meeks on
On SloanSpace we have a wonderfull set of pages under acs-admin/www/cache that allows you to view and flush your cache. Andrew brought it in, but I think it was written by someone at World Bank.

Jeff, would you be willing to take a look at it and check it into CVS if you deem fit?

Thanks,
Caroline

Collapse
Posted by xx xx on
That would be great. Since util_memoize_flush_regexp does not seem to exit on my system (4.5) and util_memoize_flush looks very awkward. I checked the 4.5-tarball too. Could you maybe post the procs.
Collapse
Posted by Jeff Davis on
Aldert, util_memoize_flush_regexp is checked into CVS in acs-tcl/tcl/memoize-procs.tcl

Here is a little code snippet that would also clear the whole cache:

foreach name [ns_cache names util_memoize] {
  ns_cache flush util_memoize $name
}
Collapse
Posted by xx xx on
That's it, thanks!
Collapse
Posted by Caroline Meeks on
Jeff has committed the acs-admin cache directory:

http://dev.openacs.org:8000//cvs/openacs-4/packages/acs-admin/www/cache/