我的 CakePHP 3.x 应用托管在 bitbucket 中。
我有一个部署脚本,它将 git clone 到一个使用时间戳作为文件夹名称的文件夹。
之后脚本将创建符号链接(symbolic link) /var/virtual/webapp/current
到这个带时间戳的文件夹。
但是,由于某些原因,尽管有这个新部署的文件夹, View 文件仍然被缓存。 tmp
文件夹也是空的。
如何使用控制台清除 View 文件的缓存,以便将其添加到 bash 脚本中?
'Cache' => [
'default' => [
'className' => 'File',
'path' => CACHE,
],
/**
* Configure the cache used for general framework caching. Path information,
* object listings, and translation cache files are stored with this
* configuration.
*/
'_cake_core_' => [
'className' => 'File',
'prefix' => 'myapp_cake_core_',
'path' => CACHE . 'persistent/',
'serialize' => true,
'duration' => '+2 minutes',
],
/**
* Configure the cache for model and datasource caches. This cache
* configuration is used to store schema descriptions, and table listings
* in connections.
*/
'_cake_model_' => [
'className' => 'File',
'prefix' => 'myapp_cake_model_',
'path' => CACHE . 'models/',
'serialize' => true,
'duration' => '+2 minutes',
],
],
最佳答案
试试这个
// Clear one cache config
bin/cake cache clear <configname>
// Clear all cache configs
bin/cake cache clear_all
关于bash - CakePHP 3.x 如何使用控制台清除 View 缓存?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29893003/