Improve user control over caching

#4430