Improvements to caching