Restored caching functionality