laravel-geoip: When CACHE_DRIVER=file => "This cache store does not support tagging"
Hi,
When “CACHE_DRIVER=file” is receive this error:
BadMethodCallException in Repository.php line 391: This cache store does not support tagging. in Repository.php line 391 at Repository->tags(array('torann-geoip-location')) in CacheManager.php line 301 at CacheManager->__call('tags', array(array('torann-geoip-location'))) in Cache.php line 32 at Cache->__construct(object(CacheManager), array('torann-geoip-location'), '30') in GeoIP.php line 91
Unfortunatly, I must configure my cache this way to make it work: CACHE_DRIVER=array
FYI, I’m upgrading from 0.2 to 1.0. Was working with “CACHE_DRIVER=file”
Any ideas?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 19
Go to .env and write CACHE_DRIVER=array
@omer414 You can set the cache_tags to null or remove it completely from the config file. This will prevent using cache tags, but still cache. By doing this you lose the ability to clear the geoip only cache via the artisan command.
'cache_tags' => null,Solved with this
Is it possible to do this without changing the cache driver to array? In the previous version this worked fine with the file driver, is there a way we can still do this with the file driver? I am a bit concerned about how it might effect the rest of the system.
To remove the cache tags you can set the option to null in the config file.
'cache_tags' => null,@jonjie0317 The caching mentioned here is about caching the geo ip info only. Caching is always recommended to speed up and avoid looking up the same ip info over and over again. The package provides an artisan command to clear only the geo ip related cache. But this feature does not work with file or database cache. This also means that the package used to break on using these types of cache. A work over around was to lose the ability to clear geo ip only cache and yet have the package working and cache normally. You need to edit the geoip.php config file to get it working.
@SandeeshS It still not working huhu
Please check the latest documentation and make sure your installation is correct. http://lyften.com/projects/laravel-geoip/doc/
You should ultimately have the ‘config/geoip.php’ config file.
@SandeeshS Is it ok to lose the ability to clear the geoip? …and. I’m using laravel 5.1, how can I remove it? Here’s my cache.php: