laravel-geoip icon indicating copy to clipboard operation
laravel-geoip copied to clipboard

This cache store does not support tagging

Open tontonAurel opened this issue 7 years ago • 9 comments

When updated torann/geoip from 1.0.7 to 1.0.8 i got this error : This cache store does not support tagging. I use file as cache driver and my version of laravel is 5.6.38

tontonAurel avatar Sep 22 '18 20:09 tontonAurel

I also have the same problem after updating from 1.0.7 to 1.0.8

brentscholl avatar Sep 24 '18 20:09 brentscholl

Use redis for caching as described in the config file:

/* |--------------------------------------------------------------------------

Cache Tags
Cache tags are not supported when using the file or database cache
drivers in Laravel. This is done so that only locations can be cleared.
*/

voicecode-bv avatar Oct 02 '18 12:10 voicecode-bv

Yes, i'm agree with you but it's minor update (from 1.0.7 to 1.0.8), it should not break the application since we didn't change anything else

tontonAurel avatar Oct 02 '18 12:10 tontonAurel

I have a same issue, no matter what I try It doesn't work. I'm using Laravel 5.7 and geoip 1.0.8

codepandit avatar Oct 10 '18 11:10 codepandit

Agreed, I have cache set to none and it still happens.

Edit:

cache => 'none',
cache_tags => null,

Seems to work.

rappasoft avatar Oct 14 '18 21:10 rappasoft

Change your Cache driver to 'array' in .env

ashu555 avatar Oct 18 '18 07:10 ashu555

I had commented out the cache_tags line when I first installed the package a year ago for this exact reason, and it's been working fine with file-based caching.

//'cache_tags' => ['torann-geoip-location'],

This update broke it. So what specifically changed is that now cache_tags defaults to on instead of off. Instead of commenting out that line, you now need to explicitly set cache_tags to false or null, like @rappasoft said.

'cache_tags' => false,

Edit: Just to clarify, you can leave caching on and set tags to off. The only thing cache_tags does is make it possible to clear the geoip cache without touching anything else that has been cached.

'cache' => 'all',
'cache_tags' => false,
'cache_expires' => 30,

brians-code avatar Nov 07 '18 22:11 brians-code

This is how I fixed the problem #Setup for GEOIP

Open up config/geoip.php

##Tasks for GEOIP -[ ] Change the service to 'maxmind_database' -[ ] Change the cache tags to a more dynamic method of handling the environment.

Setup the service

    service' => 'maxmind_database',

Change the Cache Tags

    'cache_tags' => env('CACHE_DRIVER', 'array') === "file" ? null : ['torann-geoip-location'],

tiznull avatar Sep 26 '19 22:09 tiznull

Don't forget to run php artisan config:cache after editing config/geoip

felix2056 avatar Jul 05 '20 21:07 felix2056