Make the cache JSON middleware an object