Implemented Redis caching

Redis caching implemented which caches sql query as key and its result
as value.