only set up S3 caching if actually used