Reputation: 5791
Case scenario:
$dbResult = myEloquentClass::remember(60)->all();
My results are being cached, which works great for a production environment.
However, i am finding myself removing the remember
method in my development environment since i don't want to cache my database results.
This results in a lot of unnecessary removal/additions of code.
Is there a way to bypass the cache globally for eloquent's remember
when in development environment?
Upvotes: 0
Views: 113
Reputation: 174
In laravel - 4 edit the app/config/local/cache.php file and set the driver
to array
.
<?php
return array(
'driver' => 'array',
);
For laravel 5 - edit the .env file and set the CACHE_DRIVER
to array
CACHE_DRIVER=array
Upvotes: 2
Reputation: 5791
As posted by @bogdan,
I switch my development cache.php
config file's driver
to array
, and works as advertised.
Upvotes: 0