user2617403
user2617403

Reputation: 397

Disable Laravel Redis Cache

i have set up the laravel Eloquent ORM query with Redis cache, i.e ->remember(10)->get(), for 10 mintues cache, however, i want to disable all the cache somehow when I am working on the development site, on production site, the cache need to be turned on.

how can I turn on and off the cache without removing the ->remember(10) from the query? Because i have many query and do not want to remove them one by one in development site and add them all in production site.

i have tried ->remember(0), -1, none, all not working, the redis cache still working.. any one can help?

Upvotes: 1

Views: 5321

Answers (1)

Valentin
Valentin

Reputation: 602

You should have an environment file (.env) where you can set up the cache driver. Use the array or file driver on the development environment and redis on your production environment.

http://laravel.com/docs/5.0/configuration#environment-configuration

Upvotes: 5

Related Questions