TABLE
TABLE = 'strata_frame'
The table records live in.
The frame index a site runs on.
Deduplication only pays if the index outlives the request that built it: a frame written on Monday has to be recognised on Tuesday, or every flush re-uploads content the bucket already holds. The in-memory index is for a single process; this is the one a site uses.
Recording a frame is an upsert rather than a read followed by a write, so two concurrent flushes storing the same content cannot lose one another's reference.
Every row here is derived from the objects in the bucket and is rebuilt by strata:reindex,
which is what makes it safe for an uninstall to drop the table.
record(\Drupal\strata\Cas\FrameRecord $record) : \Drupal\strata\Cas\FrameRecord
Records a newly stored frame, or increments an existing one.
| \Drupal\strata\Cas\FrameRecord | $record | The record. |
The stored record, with its resulting reference count.
relocate(\Drupal\strata\Cas\FrameRecord $record) : \Drupal\strata\Cas\FrameRecord
Replaces where a frame lives and how it is encoded, keeping its reference count.
| \Drupal\strata\Cas\FrameRecord | $record | The record's new location and encoding. Its reference count is ignored in favour of the one already stored. |
The stored record, with the reference count it kept.
page(int $limit = 1000, int $offset = 0) : list<\Drupal\strata\Cas\FrameRecord>
One page of every frame the index holds, referenced or not, oldest first.
| int | $limit | Most records to return. |
| int | $offset | Records to skip. |
The page, empty once the offset is past the end.
dependents(string $hash, int $limit = 100) : list<\Drupal\strata\Cas\FrameRecord>
Frames that decode against a given frame.
| string | $hash | Content address of the candidate parent. |
| int | $limit | Most records to return, so the query stays bounded on a frame with many children. |
Records naming this frame as their delta parent.
deepestChains(int $minimum, int $limit = 100) : list<\Drupal\strata\Cas\FrameRecord>
Frames whose delta chains are at least a given depth, deepest first.
| int | $minimum | Fewest links a chain must have to be returned. Zero returns every delta frame. |
| int | $limit | Most records to return, so a pass over a store with many long chains stays bounded. |
The records, deepest chain first.
statistics() : array{frames: int, rawBytes: int, storedBytes: int, orphans: int, ratio: float}
What the store holds, for the settings form and the storage explorer.
Frame count, decoded and stored byte totals, how many frames are collectable, and the overall compression ratio.