PRELOAD breaks things like exist()
When working with S3Boto as the storage backend for something like django staticfiles, a common workflow breaks when you set AWS_PRELOAD_METADATA = True.
Using something like CachedFilesMixin, collectstatic has the following steps:
- Upload files that are present locally and missing on S3
- iterate over every file in S3 and post_process it
If you use AWS_PRELOAD_METADATA and have a file that isn't present on S3, you'll get an exception during post_processing, because exists() will return false based on the preloaded data.
Basically, file saves should invalidate / update preload data, so subsequent calls see the changes.