logo

Cache exclusion in Drupal - Disable cache for certain pages or template

22
April

Cache exclusion in Drupal - Disable cache for certain pages or template
By: Anonymous | Published On: Wed, 04/22/2020 - 22:13

These below code you can put on your template pages, you can apply condition according to requirement so so caching will exclude for those pages where apply this code.

$GLOBALS['conf']['cache'] = FALSE;
$GLOBALS['do_not_cache'] = 1;

We can use CacheExclude module to manage caching for perticular page or condition https://www.drupal.org/project/cacheexclude

Need Help ?