To manage cached data we must specify configuration parameter and its values.
An example of redis.conf file is available in
redislink
When redis is used as a cache server, it uses an approximated LRU(Least Recently Used)technique to evict cached data.
Data can be evicted by using any 7 of the supported eviction policies of LRU.
LRU cache
We can set time for a key to evict by using TTL(time to leave).
For more information refer:
Link1
Link2