OWN_PREFIX
OWN_PREFIX = 'strata'
Collection prefix this module owns, never captured.
Hands out key-value stores that record what is written to them.
The keyvalue service is a factory, so the factory is what gets decorated and each store it
produces is wrapped on the way out. Stores are cached per collection here as well as in the inner
factory, so a collection asked for twice returns the same wrapper and not two.
Strata's own collections are handed through unwrapped. Recording the journal's own bookkeeping in the journal is a feedback loop rather than a backup.
So is the state collection, for a different reason. Core's state service is
State(@keyvalue, ...) and its constructor asks this factory for the collection called state,
so a wrapped store there means every state write is recorded twice - once as state by
StateCapture, and again as keyvalue under the subject state:<key>.
The expirable factory is deliberately NOT decorated. An expirable value is a cache with a deadline; capturing one would record something whose correct future state is "gone", and restoring it would put back an entry the site had already finished with.
$recorder : \Drupal\strata\Capture\KeyRecorder|\Closure
__construct(\Drupal\Core\KeyValueStore\KeyValueFactoryInterface $inner, \Drupal\strata\Capture\KeyRecorder|\Closure $recorder) : mixed
Constructs the factory.
| \Drupal\Core\KeyValueStore\KeyValueFactoryInterface | $inner | The factory being wrapped. |
| \Drupal\strata\Capture\KeyRecorder|\Closure | $recorder | Journals each write the stores make, or a closure returning one. A closure is what a site gets, and it is not an optimisation.* Core's
|