Laravel 缓存存储不支持标记
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/37462365/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Laravel cache store does not support tagging
提问by Vijayanand Premnath
I am getting this error since I installed Zizaco\Entruston my Authentication Routes.
自从我在身份验证路由上安装Zizaco\Entrust以来,我收到此错误。
BadMethodCallException: This cache store does not support tagging.
I had few known issues and I had to change some config options and that is the reason I am getting this error.
我几乎没有已知问题,我不得不更改一些配置选项,这就是我收到此错误的原因。
What does this error relate to so that I can find the problem and fix it instead of finding the code I modified?
这个错误与什么有关,以便我可以找到问题并修复它而不是找到我修改的代码?
Thanks
谢谢
回答by thefallen
Cache tags are not supported when using the fileor databasecache drivers. The Entrustpackage probably uses them somewhere. You should be ok if you change it to array, memcacheor apcfor example.
使用文件或数据库缓存驱动程序时不支持缓存标记。该委托包可能使用它们的地方。例如,如果将其更改为array、memcache或apc,则应该没问题。
回答by Mahesh Yadav
Laravel file and database drivers doesn't support tags.
Laravel 文件和数据库驱动程序不支持标签。
What you need to update, to fix this issue is simply change the cache driverfrom fileto arrayin your .env (located in root folder) file as below.
你需要更新,来解决这个问题是什么简单的改变高速缓存驱动器从文件到阵列中的.ENV(位于根文件夹)文件,如下。
CACHE_DRIVER=array
CACHE_DRIVER=数组
Hope it helps!!
希望能帮助到你!!
回答by Shabeer Sha
open .env
file and
change
打开.env
文件并更改
CACHE_DRIVER=file to CACHE_DRIVER=array
Or add this line showing below
或者添加下面显示的这一行
CACHE_DRIVER=array
After that go your command prompt or open the terminal then type
之后去你的命令提示符或打开终端然后输入
php artisan config:cache
回答by Sujiraj R
Use this command in your command prompt
在命令提示符中使用此命令
php artisan config:cache
回答by user12285906
In Your .env file change
在您的 .env 文件更改中
CACHE_DRIVER=file
To
到
CACHE_DRIVER=array
Then run these commands
然后运行这些命令
php artisan config:clear
php artisan config:cache
It will work
它会工作
回答by Jay Momaya
in your .env file change to cache array
在您的 .env 文件中更改为缓存数组
CACHE_DRIVER=array
and dont forget to run
并且不要忘记运行
php artisan config:cache
回答by Mauro Bilotti
My solution was to change in cache.phpthe following line from "file" to "array" as well:
我的解决方案是将cache.php 中的以下行也从“文件”更改为“数组”:
'default' => env('CACHE_DRIVER', 'array')
Hope it helps!
希望能帮助到你!
回答by Arturo Escobedo
If you continue having the issue, you should change your entrust version to
如果您仍然遇到问题,您应该将您的委托版本更改为
dev-laravel-5
回答by Kaushik shrimali
Cache tags are not supported when using the file or database cache drivers. The Entrust package probably uses them somewhere.
使用文件或数据库缓存驱动程序时不支持缓存标记。Entrust 包可能在某处使用它们。
Open .env
file set
打开.env
文件集
CACHE_DRIVER = array
SESSION_DRIVER = file
then make command in terminal
然后在终端中执行命令
php artisan config:cache