Implement sample caching and download