implementation of Redis caching