Caching for Drupal sites
What is caching
Caching is a website function that allows commonly visited pages to be saved, which allows the website to show visitors the saved version instead of having to make all the page information requests with each visit. This allows sites to serve pages to visitors faster and get them the information they are looking for with less waiting.
How to utilize caching
- Caching can be enabled or reviewed from the top menu bar. Click the Configuration tab.
- Then select Development -> Performance, or by visiting http://<InsertSiteName>/admin/config/development/performance.
- From the dropdown under Browser and proxy cache maximum age, select the amount of time pages should be cached before being recreated. DIT suggests a minimum of 1 hour for this setting, but 6 hours to even 1 day make the caching perform even better.
Update cached content
If you enabled caching, you may need to Flush Cache (Clear all caches button) to see any changes made to your site. There are several methods available to flush the cache:
- From the above http://<InsertSiteName>/admin/config/development/performance page there is a clear all caches button. This option is also available from the top menu, under the left hand Drupal icon.
- The Devel module has a block named Development you can enable that gives easy access to quick cache flushing.
- If you're a more technical user look at Drush. You can flush cache with one shell command drush cc all.
Caching in lower environments
Typically during development, caching should be disabled. On Live sites, caching should always remain enabled for best performance. This allows updates to show during the quicker iterative development period, and allows content to be presented to users with the best performance.
For more information, see the documentation below.