Use context manager to temporarily mock the cache