Caching for testing