-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This cache store does not support tagging. #147
Comments
I'm getting this too. Using redis as a cache driver... @Torann any fixes for that? |
I ended up setting 'cache_tags' as an empty array in /*
|--------------------------------------------------------------------------
| 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.
|
*/
'cache_tags' => [], |
What version of Laravel are you using? |
@Torann I'm using LV 5.8 |
It sounds like you are trying to use caching with GeoIP, but the caching driver you have set as the default for the application doesn't support tagging, which is a requirement for caching to work with GeoIP. I would suggest turning off caching for GeoIP, |
@Torann setting On a side note, the object returned does not contain |
It is not caching. Doing |
Another quick is to change CACHE_DRIVER in .env to |
Another quick change in
|
@Torann I set cache to 'none' and it still attempts to initialize the Cache object, throwing the BadMethodCallException. I think there should be another check like Thanks for putting out this package! |
If anyone is interested in a quick fix for this issue, I use file for local dev and use redis for production/staging. Here is some code I added to the geoip config file 'cache_tags' => (
strtolower(config('cache.default')) === 'file'
|| strtolower(config('cache.default')) === 'database'
) ? [] : [
'torann-geoip-location'
], |
I would recommend just turning off caching on your local, or if you're using Homestead just use the Redis built into it. It's better to mirror your production env when developing locally, less likely to run into one offs like this :-) |
'cache_tags' => in_array(config('cache.default'), ['array', 'redis'])
? ['torann-geoip-location']
: null, |
Which solution i should use. i am confused littlebit :) |
src/Cache.php 32 row add code
The text was updated successfully, but these errors were encountered: