id()
id() : string
A short identifier, used to name this source in a problem report.
Returns
string —For example "redis" or "database".
Somewhere ephemeral keys can be enumerated from.
What holds the keyspace differs per site - Redis when strata_redis is installed, the cache and
key-value tables otherwise, something else entirely on a site with a custom backend - so discovery
asks sources rather than knowing about backends. A submodule contributes one by tagging a service.
Two rules bind every implementation:
keys(int $limit) : \Traversable<string,int>
The keys this source holds, with their sizes.
| int | $limit | Most keys to return. |
When the backend cannot be read at all.
Key name keyed to its size in bytes. A source that cannot measure a size yields zero rather than guessing, and the byte totals are then understood to be a lower bound.