added caching restriction

don't use Redis is Caching is not enabled in config.