How to Enable and Clear Cache on a Drupal 7 Website

Since cache plays an important role in website speed enhancement, most webmasters attach great importance to cache setup and the one who create a site on Drupal is no exception. Here, we make clear the way to enable cache on a Drupal 7 website as well as mention how to clear certain caches of no use.

Once caching your Drupal 7 site, all pages browsed by visitors are going to be copied and stored in memory. When visitors come to load the pages again, the content appears much faster than ever before. That is a great method to provide visitors with better browsing experience.

How to Enable Cache in Drupal 7?

We would like to enable cache via Drupal admin panel. Log into your Drupal 7 dashboard and target Configuration on the menu bar to access to Configuration page. There are several modes available for Drupal configuration, such as People, System, media, and so on. Here requires you to click “Performance” via Development mode.

Configuration Development Performance

Focus on the Caching mode and that enable a list of options to customize your website caching. To enable cache in Drupal 7, you just need to check the option “Cache pages for anonymous users” and option “Cache blocks” under Caching. That’s it!

Enable Caching

The “Minimum cache lifetime” requires you to determine the minimum time for the cached pages and that should be from 1 minute to 1 day. The “None” option means no time limit for cached pages. For example, if you set the minimum cache lifetime as “1 day”, then the cached page will be into effect at least one day.

If you wish to set the maximum lifetime of cached pages, you should go with “Expiration of cached pages”. The drop-down list enables you to set expiration from 1 minute to 1 day. In this case, the cached page will be disabled when the expiration date has come.

How to Clear Cache in Drupal 7?

The way to clear cache is much easier than what to enable cache for your web pages. Log into Drupal 7 dashboard and then click Configuration tab on the menu bar. Here you come to the Configuration where enables various sections for you to configure your Drupal website. Go to Development > Performance and this is where to enable and clear cache in Drupal 7.

You just need to focus on the first mode called “Clear Cache” and then give the “Clear all caches” a click. It takes a few seconds to clear all caches. Since an excess of cache will occupy a large amount of memory, we suggest you to clear caches on your website regularly.

Clear All Caches