Fix caching when using remote redis server