This page is incomplete
An option is to set CACHE=array
on your .env file.
I need to learn why this happens and what other alternatives there are to avoid this error.
This happened to me when installing laravel-geoip
https://github.com/Torann/laravel-geoip/issues/123
It makes sense that you don't want to change your cache type if you're using file
or database
to array
simply to use a function in this package.
Other users recommended to publish tarenn/geoip
's config file and disable caching and tagging.
# Publish the configuration file
php artisan vendor:publish --provider="Torann\GeoIP\GeoIPServiceProvider" --tag=config
# Copied File [/vendor/torann/geoip/config/geoip.php] To [/config/geoip.php]
# Publishing complete.
// ...
'cache' => 'none', // defaults to 'all'
// ...
'cache_tags' => [], // defaults to // ['torann-geoip-location']
// ...
Another option is to conditionally set the tag.
// ...
'cache_tags' => env('CACHE_DRIVER') == "array" ? ['torann-geoip-location'] : null,
// ...