Generalize the cache