Boost is working good on my website but the problem is that after making any changes to my website I clear all cache from performance page. The changes I have done are reflecting if I am accessing site with www but not updating if I am accessing website without www
3 Answers
You need to clear the Boost cached pages, i.e. the static pages. You can do that on the Boost settings page at the bottom under Clear Boost's Database & File Cache
. If you only have changed one page you can just clear this page by enabling the boost block Boost: Pages cache configuration
.
Edit: After a bit more thinking I am not sure clearing the Boost cache will fix your issue. However, do yourself a favor and change your .htaccess
rules to redirect users to either with www or without www. I would suggest with as that is working for you. Having both counts as duplicated content in search engines and you risk to loose ranking.
To fix this, uncomment the following part in your .htaccess
file (around line 81), or add it if it's missing:
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
-
thanks for help, but if I am accessing website through parked domains it still shows the cached website. Commented Mar 15, 2013 at 20:03
Boost actually caches the pages by url. So it treats www and without www are 2 unique urls and cache them separately. So as suggested above, you can redirect all urls without www to www urls so that users access only 1 url any time. Or else you need to clear cache for both the urls.
You can also implement some hooks to automatically clear the cache.
The below code is a bit aggressive, and just clears everything at any node change. It could be done more sophisticated, only clearing what is necessary.
/**
* Flush all Boost's cache when any change is made.
*/
if (function_exists('_boost_rmdir')) {
function your_module_clear_cache($flush=true) {
_boost_rmdir(boost_get_normal_cache_dir(), $flush);
}
function your_module_node_update($node) {
your_module_clear_cache();
}
function your_module_node_delete($node) {
your_module_clear_cache();
}
function your_module_node_insert($node) {
your_module_clear_cache();
}
function your_module_entity_translation_save($node) {
your_module_clear_cache();
}
}