How do I empty the Drupal caches:
Effectively, how do you instruct an end user to clear his caches?
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.
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.
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
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".
If you want to clear the cache from a module, you can use the following code.
drupal_flush_all_caches();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With