Open vigikaran opened 7 years ago
I am having the same problem has anyone managed to fix this?
Each page request is performing a database request with redis as the cache_driver.
Actually I have found out what is causing this and its not related to redis it is for all cache drivers.
getCurrencies() in Currency.php has a flag to say if your app is in debug mode then do not cache.
public function getCurrencies()
{
if ($this->currencies_cache === null) {
if (config('app.debug', false) === true) {
$this->currencies_cache = $this->getDriver()->all();
}
else {
$this->currencies_cache = $this->cache->rememberForever('torann.currency', function () {
return $this->getDriver()->all();
});
}
}
return $this->currencies_cache;
}
Is this really needed? Not sure why you wouldnt want cached currencies during development. At least could we have this as a config option so we can override it?
i'm using cache driver as redis but it not seems to use cached? my config as follows
'cache_driver' => 'redis',