Configuring Redis as Cache interface in a Laravel 5 Application

Redis cache store uses the cache database connection by default. If you look at config/database.php it switches to database 1 for caching by default. To view the keys in the terminal, you have to select which database to use first.

127.0.0.1:6379> SELECT 1
127.0.0.1:6379[1]> KEYS *

Using different databases allows you to separate your cache and session store, it can be handy when you need to delete all cache keys (flushdb) but keep the user session. You can even add a separate connection for queues. Note that it's not recommended to use multiple databases, use multiple Redis instance instead.