Posts

Showing posts from November 7, 2012

How does caching work in Drupal?

Image
In my experience, there seems to be a lot of misunderstanding how Drupal caching works. I'm not talking about advanced caching mechanisms like Varnish, APC or memcache here, I'm talking about the core Drupal caching: page cache and block cache which are available in Drupal 7 core. Drupal 6 is similar but works a but differently because page caching was simplified for Drupal 7 (e.g. aggresive mode is now a available as a settings.php var) and the entire system also has become pluggable. Everybody knows this screen and the settings. But what do they exactly mean? What difference do they actually make? What do they do? Here is an attempt to explain the settings at '/admin/config/development/performance' . Page Caching: If enables, page caching will only be used for anonymous users. If you enable page caching, the entire HTML of each page will be stored in the database. This significantly reduces the amount of queries needed. This automatically means that bl