basic caching and download functionality