Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I empty Drupal Cache (without Devel)

Tags:

How do I empty the Drupal caches:

  • without the Devel module
  • without running some PHP Statement in a new node etc.
  • without going into the database itself

Effectively, how do you instruct an end user to clear his caches?

like image 513
alexanderpas Avatar asked Aug 04 '09 22:08

alexanderpas


People also ask

Where is Drupal cache stored?

Drupal 8 or higher provides an Internal Page Cache module that is recommended for small to medium-sized websites. This core module, which is enabled by default, caches pages for anonymous users. It can be found at core/modules/page_cache. This feature improves performance because it speeds up the site.

How do I clear my theme cache?

To clear your WordPress site's cache with The WP Super Cache plugin, on your WordPress dashboard, navigate to Settings, then Wp Super Cache, then click Delete Cache. W3 Total Cache is designed to enhance the user experience of your website by speeding up the loading speed of your content through CDN integration.


3 Answers

When you are logged as an admin (obviously, not every user of the site has to power to clear the cache), there should be a page in "Administer > Site Configuration > Performance".

And, at the bottom of the page, there should be a button (something like "Clear cached data") to clear the cache

As far as I remember, there's no need for Devel to do that, and you really don't need to go to the database, nor run some home-made PHP code.


As a reference, you can take a look at How to Clear Drupal Server-side cache

like image 153
Pascal MARTIN Avatar answered Oct 02 '22 13:10

Pascal MARTIN


You can also use the Drush module, which allows you to use the command line to execute popular Drupal commands, like "drush cron" or "drush cache clear".

like image 45
aaronsw Avatar answered Oct 02 '22 12:10

aaronsw


If you want to clear the cache from a module, you can use the following code.

drupal_flush_all_caches();
like image 36
sagesolutions Avatar answered Oct 02 '22 13:10

sagesolutions