Make caching easier for non-memory caches.