Added local file caching for S3 requests.