如何删除drupal中的缓存数据库条目?
我已清除缓存(通过单击管理/站点配置中的性能中的“清除缓存数据”。 但仍然在数据库中我看到表行: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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
清除缓存后,至少在 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.
如何删除drupal中的缓存数据库条目>可以使用以下 SQL 查询来完成,drupal 创建了多个缓存表,要删除缓存数据库条目,您可以在 phpmyadmin 的 SQL 部分下运行下面给出的查询:
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 :