INFREQUENT
INFREQUENT = 'STANDARD_IA'
The class blocks are written to when the provider supports one.
The S3 and R2 spelling. A provider using a different name takes it from configuration.
Which storage class a file block is written to.
Files are around 98% of the stored bytes on a site that captures them and get almost none of the compression benefit, so they are the one realm where the storage class is worth choosing rather than taking the default. A block is written once and read only during a restore or a verify, which is exactly the access pattern infrequent-access tiers are priced for: cheaper per byte-month, dearer per read, and a restore is rare enough for that to be the right side of the trade.
Everything else stays in the standard class. Frames, segments, anchors and commits are read by every verify pass and every replay; putting those in an infrequent tier would make the operations a backup performs routinely into the expensive ones.
A provider that does not offer classes gets no class, and the write proceeds. The class is a hint, not a requirement, and a store that ignores it is still correct.
__construct(bool $tierBlocks = true, string $blockClass = \self::INFREQUENT) : mixed
Constructs a policy.
| bool | $tierBlocks | Whether file blocks go to the infrequent class at all. |
| string | $blockClass | The class name to send for a block, so an endpoint spelling it differently still works. |
forBlock(\Drupal\strata\Storage\Capabilities $capabilities) : string|null
The class one block should be written to.
| \Drupal\strata\Storage\Capabilities | $capabilities | What the provider supports. |
The class name, or NULL to let the provider use its default, which is also what a provider with no class support gets.
blockOptions(\Drupal\strata\Storage\Capabilities $capabilities) : array<string,string>
The put options a block is written with.
| \Drupal\strata\Storage\Capabilities | $capabilities | What the provider supports. |
Options to hand the provider, empty when there is nothing to say.
fromSettings(bool|null $tierBlocks, string|null $blockClass = null) : \Drupal\strata\File\StorageClassPolicy
A policy from the module's settings.
| bool|null | $tierBlocks | Whether to tier, or NULL for the default. |
| string|null | $blockClass | The class name, or NULL for the default. |
The policy.