set cache control
This block is part of the files group and was last modified in core v10.4.28.
set cache control v10.4.28 Changes how a PUBLISHED public-media file may be cached, on object storage and at the edge, without re-uploading it. Give no-store for media that must never be kept anywhere but its origin : a one-time photo the moment its message becomes one-time : or public, max-age=31536000, immutable to make it cacheable again. The resized variants of the file ({name}_{w}x{h}.{ext}, as resize image writes them, named after the file's filename as well as its path) are re-tagged with it. Only files in the trees the media mirror serves; a file outside them answers NOT_MIRRORED, a file that never reached the store OBJECT_MISSING.
- flow
flow - files required
file - cache control required
valueThe Cache-Control the object should carry from now on, e.g.
no-store.
- flow
flow - success
condition - error
value - files
file
Re-tags an already published public-media file's Cache-Control on object storage (copy onto itself with replaced metadata) and purges the edge caches. Use `no-store` when a message is made one-time/ghost so its photo is never cached at the edge or in a browser; the file's resized variants ({name}_{w}x{h}.{ext}, found by the file's `filename` as well as its path basename) are re-tagged along with it; a variant missing on the store is skipped. Requires the media mirror (cluster setting media_object_storage_provider); files outside the mirrored trees answer NOT_MIRRORED on `error` with `success` false; a named file that is not on the store answers OBJECT_MISSING.
no-store |
one-time |
ephemeral |
cache |
uncache |
immutable |
A typical wiring for set cache control: a function trigger starts the flow; get file from assets feeds the file pin; value feeds the value pin; the flow out pin feeds debug.
Version history
Introduced in v10.4.28.
Back to
files Return to the main group to view all sub-groups Back to file modification Return to the group to view all blocks within this group 