Add a weak memory cache.