开发者

How to delete cache db entries in drupal?

开发者 https://www.devze.com 2023-02-23 02:26 出处:网络
I\'v开发者_高级运维e cleared the cache( by clicking \"Clear cache data\" in Performance in Admin/Site Configuration.

I'v开发者_高级运维e cleared the cache( by clicking "Clear cache data" in Performance in Admin/Site Configuration. But still in the DB I see rows of tables: cache,cache_form etc. When I cleared the cache in /Admin/Site Config/Performance the db size got reduced to it's 50% size. However some cache table entries still exist.

To duplicate a drupal installation, since mysql is giving error on import on phpmyadmin or on mysql command line, I've been removing all those cache entries by hand and then importing it just to remove it's size. I never found any issues with it. But isn't there any menu/link in Administration which can clean up all those cache entries just to reduce the database size?


After you clear the cache, at least when doing in the web interface, you are redirected to another page. On that, Drupal is automatically rebuilding the parts of the cache which are necessary to display that page.

You could clear the cache with Drush but what you really are looking for is a module like Backup and Migrate, which allows you to exclude certain tables (cache tables, sessions, access logs and a few others by default) when creating a database dump.

Also note that cache_form isn't a cache like the others, instead, it stores temporary form information that is not duplicated anywhere else. Losing that information means that currently displayed forms will be invalid.


How to delete cache db entries in drupal > it can be done using the following SQL Query, There are multiple cache tables created by drupal and to remove the cache Database entries you can run a query given below in your phpmyadmin under SQL section :

TRUNCATE cache;
TRUNCATE cache_admin_menu;
TRUNCATE cache_block;
TRUNCATE cache_bootstrap;
TRUNCATE cache_features;
TRUNCATE cache_field;
TRUNCATE cache_filter;
TRUNCATE cache_form;
TRUNCATE cache_image;
TRUNCATE cache_menu;
TRUNCATE cache_page;
TRUNCATE cache_path;
TRUNCATE cache_pulled_tweets;
TRUNCATE cache_token;
TRUNCATE cache_update;
TRUNCATE cache_views;
TRUNCATE cache_views_data;
0

精彩评论

暂无评论...
验证码 换一张
取 消