While adding redis as my cache store in Rails app,
i added the redis url as redis://localhost:6379/0/cache
.
What is the meaning of 0/cache
in the redis URL?
While adding redis as my cache store in Rails app,
i added the redis url as redis://localhost:6379/0/cache
.
What is the meaning of 0/cache
in the redis URL?
You may configure redis to use many databases.
The 0
means you are using the first of them (id=0).
The cache
is the namespace of the database.
Depending on where you set this url, you are actually telling to use redis caching and values will be saved/retrieved etc from the database 0
and namespace cache
.