Optimize redis cache