You are here

Drupal8 清空缓存

g089h515r806 的头像
Submitted by g089h515r806 on 星期一, 2019-09-02 07:39

 作者:亚艾元技术部

导航到管理界面,配置》开发》性能,点击清空所有缓存按钮。即可清空所有缓存。

 

如果这个时候,你的页面已经白屏,进不去。怎么办,如果是本地,可以打开phpmyadmin,找到以cache开头的数据库表,一个一个的清空缓存。

 

还有一个办法:

打开 settings.php (/sites/default/settings.php),编辑它,添加以下代码:

$settings['rebuild_access'] = TRUE;

 

使用浏览器访问URL http://www.example.com/core/rebuild.php

这里的example.com替换成你自己的。过一会即可清空。

$settings['rebuild_access'] = TRUE;

删除这一行代码。

 

此外,还可以使用drush

> drush cc
Enter a number to choose which cache to clear.
 [0]  :  Cancel
 [1]  :  drush
 [2]  :  theme-registry
 [3]  :  menu
 [4]  :  css-js
 [5]  :  block
 [6]  :  module-list
 [7]  :  theme-list
 [8]  :  render
 [9]  :  views

 

参考地址:https://www.drupal.org/docs/user_guide/en/prevent-cache-clear.html

 


论坛:

Drupal版本: