Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel cache store does not support tagging

Tags:

laravel

I am getting this error since I installed Zizaco\Entrust on my Authentication Routes.

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

like image 295
Vijayanand Premnath Avatar asked May 26 '16 13:05

Vijayanand Premnath


3 Answers

Laravel file and database drivers don't support tags.

What you need to update, to fix this issue is simply changing the cache driver from file to array in your .env (located in root folder) file as below.

CACHE_DRIVER=array

Hope it helps!!

like image 139
Mahesh Yadav Avatar answered Oct 23 '22 13:10

Mahesh Yadav


Cache tags are not supported when using the file or database cache drivers. The Entrust package probably uses them somewhere. You should be ok if you change it to array, memcache or apc for example.

https://laravel.com/docs/5.2/cache#cache-tags

like image 38
thefallen Avatar answered Oct 23 '22 12:10

thefallen


open .env file and change

  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
like image 22
Shabeer K Avatar answered Oct 23 '22 11:10

Shabeer K