fix caching and gzipping for s3 upload