如何删除drupal中的缓存数据库条目?

发布于 2024-10-31 06:58:56 字数 296 浏览 2 评论 0原文

我已清除缓存(通过单击管理/站点配置中的性能中的“清除缓存数据”。 但仍然在数据库中我看到表行:cache、cache_form 等。 当我清除 /Admin/Site Config/Performance 中的缓存时,数据库大小减少到了 50%。然而,一些缓存表条目仍然存在。

为了复制 drupal 安装,由于 mysql 在 phpmyadmin 或 mysql 命令行上导入时出现错误,我一直在手动删除所有这些缓存条目,然后导入它只是为了删除它的大小。我从未发现它有任何问题。 但是,管理中是否没有任何菜单/链接可以清理所有这些缓存条目以减少数据库大小?

I've 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

看透却不说透 2024-11-07 06:58:56

清除缓存后,至少在 Web 界面中执行操作时,您将被重定向到另一个页面。此时,Drupal 会自动重建显示该页面所需的缓存部分。

您可以使用 Drush 清除缓存,但您真正需要的是像 备份和迁移,它允许您在创建数据库转储时排除某些表(默认情况下是缓存表、会话、访问日志和其他一些表)。

另请注意,cache_form 与其他缓存不同,它存储临时表单信息,不会在其他地方重复。丢失该信息意味着当前显示的表单将无效。

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.

微暖i 2024-11-07 06:58:56

如何删除drupal中的缓存数据库条目>可以使用以下 SQL 查询来完成,drupal 创建了多个缓存表,要删除缓存数据库条目,您可以在 phpmyadmin 的 SQL 部分下运行下面给出的查询:

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;

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;
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文