Torann / laravel-geoip

Determine the geographical location of website visitors based on their IP addresses.
http://lyften.com/projects/laravel-geoip
BSD 2-Clause "Simplified" License
2.09k stars 372 forks source link

Caching none not working #127

Closed prakashmalviya closed 5 years ago

prakashmalviya commented 5 years ago

Hi Torann,

Thanks for the great package!

I just updated to new version which is "torann/geoip": "^1.0", and found that when we set below config option then we have error:

geoip.php 'cache' => 'none',

Error On: torann\geoip\src\GeoIP.php line no: 91 This cache store does not support tagging.

I'm using file caching on my application and I know laravel does not support cache tagging on file caching but I have already set NONE from config but it's not working for me.

I things before setting cache instance you have to check caching should not be set NONE

// Create caching instance if ($this->config('cache', 'none') !== 'none'){ $this->cache = new Cache( $cache, $this->config('cache_tags'), $this->config('cache_expires', 30) ); }

I have below configuration:

PHP : 7.0.1 Laravel: 5.3

paschaldev commented 5 years ago

+1

wurlJAM commented 5 years ago

+1

winningtechnologies commented 5 years ago

Setting cache_tags to false solves this

'cache_tags' => false,