Rewrite the Cache implementation.