本文介绍了Symfony-无法通过命令清除缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在游荡的机器上(霍姆斯特德).在我的Homestead.yml中,我有:
I'm working on a vagrant machine (Homestead). In my Homestead.yml I have:
sites:
- map: myproject.local
to: /home/vagrant/projects/myproject/web
type: symfony
我正在使用PHP 7.1.2上的Symfony版本3.3.
I'm working with Symfony version 3.3 on PHP 7.1.2.
问题是,当我尝试执行命令php bin/console cache:clear
时,出现以下错误:
The problem is when I try to execute the command php bin/console cache:clear
I'm getting the following error:
在我的 AppKernel.php 中,我有:
public function getCacheDir()
{
return dirname(__DIR__).'/var/cache/'.$this->getEnvironment();
}
当我转储$this->getEnvironment()
时,它会显示 dev .
When I dump $this->getEnvironment()
it says dev.
这里可能是什么问题?
推荐答案
这是与虚拟平台相关的问题.一个简单的解决方法是手动删除.
This is a Virtual platform related issue.A simple workaround is to remove manually.
$ sudo rm -rf app/cache/*
详细了解此问题应用程序/控制台缓存:明确的问题
这篇关于Symfony-无法通过命令清除缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!