Quick rundown of what I'm doing: We have an alert system set up on our site through a custom module that I wrote. When we go into alert mode, several things happen including that our site's theme changes and the frontpage content changes to a listing of blog posts so we can update user's on what is going on.
What I would like to do is include within my module a call to boost to clear its database and file cache so that the site's changes will happen right away. I've been playing around with calling some different boost functions but I can't seem to get it to work. Is there a simple way to clear all of boost's cache data or even just disable boost from within my custom module?
Any help is much appreciated.
Comments
Comment #1
sillygwailoThere's
boost_cache_clear_all()for just the file cache. You might want to write a short function, recycling code fromboost_clear_cache_submit()to delete all the files and database entries (see sample below). For clearing the expired stale files, you can useboost_cache_expire_all().Comment #2
sillygwailoTo disable the Boost cache, you can simply set its variable:
To enable it again:
You'll probably want to clear the cache beforehand. I'm not sure how the .htaccess changes you'd still have in place would affect disabling the Boost cache.