Community Documentation

Boost: store the cache in a different directory

Last updated June 30, 2012. Created by bgm on February 28, 2012.
Log in to edit this page.

By default, boost stores its cache in the "cache" directory located at the root of the website.

A frequent request is to store the cache on a per-site directory under other files generated by the site, in sites/example.org/files/cache/, for example. However, this is likely to cause issues with how the Drupal htaccess rules for multi-site work.

Note that the default way boost stores the cache does support multi-sites. You should not need to change this setting unless you have specific requirements.

If you need to change the location of the cache:

  • Go to admin/config/system/boost/filesystem,
  • Change the "Root cache directory", for example, instead of "cache", you can use "sites/cache",
  • Click on "Save configuration".
  • Then go to admin/config/system/boost/htaccess/generator to get a new version of the htaccess rules to insert into your .htaccess.

If you want to store the cache outside your Drupal directory hierarchy, you will need to create a symlink to the real location or create an Apache alias.

Further reading:

Page status

No known problems

Log in to edit this page

About this page

Drupal version
Drupal 7.x
Audience
Site administrators, Site builders
Level
Intermediate
Keywords
boost, cache, caching, performance
Drupal’s online documentation is © 2000-2013 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License. Comments on documentation pages are used to improve content and then deleted.
nobody click here