Out of the box Lumen doesn’t work with Redis for caching. I met errors such as
class redis does not exist along with other errors. Here is a quick way to get Redis working with your cache in Lumen 2.5.
First you need to add two packages to your composer.json
"predis/predis": "^1.0", "illuminate/redis": "^5.2"
then run your
and this will install the packages needed to work with Redis.
The final piece of the puzzle is you have to register the service yourself in
To use the Cache facade you'll need to uncomment the
in your controller and this should allow you to now use Redis in your Lumen 2.5 app.