Implement caching for #58