᲼ Posts - Tigris

Problem with Cache Control

I don't know if I'm doing something wrong, but when I set a cache-control field on tigris it just ignores it:

aws s3 cp \
  --content-type "application/json; charset=utf-8" \
  --cache-control 'public, max-age=300' \
  --metadata-directive REPLACE \
  "$MY_FILE" \
  "s3://$BUCKET_NAME/$MY_FILE" \
; \
sleep 60
; \
aws s3api head-object \
  --bucket "$BUCKET_NAME" \
  --key "$MY_FILE" \
  --output json |
    jq -r '.CacheControl'
# public, max-age=259200, stale-while-revalidate=3600, stale-if-error=600

The returned value is the bucket-wide default I have set (Bucket Settings -> Storage Settings -> Cache Control).

The description of the field ( This lets you set the default Cache-Control header for objects in the bucket) gives me the impression that it shouldn't smash my own settings.

Maybe it's some sort of timeout or data race since I first uploaded the file without a cache-control header before deleting/modifying it (UPDATE: happens on new files as well).

Giving it 60s seemed more than enough for everything to settle (Global, public bucket, Standard storage tier, Strict consistency, object ACLs enabled).

If these settings are incompatible in some way it would be a real shame since I really don't wanna manually set each cache-control, but I need some files to be short-lived.