MediaWiki REL1_37
|
Lightweight class for tracking path dependencies lists via an object cache instance. More...
Public Member Functions | |
__construct (BagOStuff $stash) | |
remove ( $type, $entities) | |
Delete the currently tracked dependencies for an entity or set of entities. | |
renew ( $type, $entities, $ttl) | |
Set the expiry for the currently tracked dependencies for an entity or set of entities. | |
retrieveMulti ( $type, array $entities) | |
Get the currently tracked dependencies for a set of entities. | |
storeMulti ( $type, array $dataByEntity, $ttl) | |
Set the currently tracked dependencies for a set of entities. | |
Public Member Functions inherited from Wikimedia\DependencyStore\DependencyStore | |
newEntityDependencies (array $paths=[], $asOf=null) | |
retrieve ( $type, $entity) | |
Get the currently tracked dependencies for an entity. | |
store ( $type, $entity, array $data, $ttl) | |
Set the currently tracked dependencies for an entity. | |
Private Member Functions | |
getStoreKey ( $type, $entity) | |
Private Attributes | |
BagOStuff | $stash |
Lightweight class for tracking path dependencies lists via an object cache instance.
This does not throw DependencyStoreException due to I/O errors since it is optimized for speed and availability. Read methods return empty placeholders on failure. Write methods might issue I/O in the background and return immediately. However, reads methods will at least block on the resolution (success/failure) of any such pending writes.
Definition at line 36 of file KeyValueDependencyStore.php.
Wikimedia\DependencyStore\KeyValueDependencyStore::__construct | ( | BagOStuff | $stash | ) |
BagOStuff | $stash | Storage backend |
Definition at line 43 of file KeyValueDependencyStore.php.
References Wikimedia\DependencyStore\KeyValueDependencyStore\$stash.
|
private |
string | $type | |
string | $entity |
Definition at line 115 of file KeyValueDependencyStore.php.
Referenced by Wikimedia\DependencyStore\KeyValueDependencyStore\remove(), Wikimedia\DependencyStore\KeyValueDependencyStore\renew(), Wikimedia\DependencyStore\KeyValueDependencyStore\retrieveMulti(), and Wikimedia\DependencyStore\KeyValueDependencyStore\storeMulti().
Wikimedia\DependencyStore\KeyValueDependencyStore::remove | ( | $type, | |
$entities | |||
) |
Delete the currently tracked dependencies for an entity or set of entities.
string | $type | Entity type |
string | string[] | $entities | Entity name(s) |
DependencyStoreException |
Reimplemented from Wikimedia\DependencyStore\DependencyStore.
Definition at line 88 of file KeyValueDependencyStore.php.
References $keys, $type, and Wikimedia\DependencyStore\KeyValueDependencyStore\getStoreKey().
Wikimedia\DependencyStore\KeyValueDependencyStore::renew | ( | $type, | |
$entities, | |||
$ttl | |||
) |
Set the expiry for the currently tracked dependencies for an entity or set of entities.
string | $type | Entity type |
string | string[] | $entities | Entity name(s) |
int | $ttl | New time-to-live in seconds |
DependencyStoreException |
Reimplemented from Wikimedia\DependencyStore\DependencyStore.
Definition at line 99 of file KeyValueDependencyStore.php.
References $keys, $type, and Wikimedia\DependencyStore\KeyValueDependencyStore\getStoreKey().
Wikimedia\DependencyStore\KeyValueDependencyStore::retrieveMulti | ( | $type, | |
array | $entities | ||
) |
Get the currently tracked dependencies for a set of entities.
string | $type | Entity type |
string[] | $entities | Entity names |
DependencyStoreException |
Reimplemented from Wikimedia\DependencyStore\DependencyStore.
Definition at line 47 of file KeyValueDependencyStore.php.
References $blob, $type, Wikimedia\DependencyStore\KeyValueDependencyStore\getStoreKey(), and Wikimedia\DependencyStore\DependencyStore\newEntityDependencies().
Wikimedia\DependencyStore\KeyValueDependencyStore::storeMulti | ( | $type, | |
array | $dataByEntity, | ||
$ttl | |||
) |
Set the currently tracked dependencies for a set of entities.
string | $type | Entity type |
array[] | $dataByEntity | Map of (entity => (paths: paths, asOf: UNIX timestamp or null)) |
int | $ttl | New time-to-live in seconds |
DependencyStoreException |
Reimplemented from Wikimedia\DependencyStore\DependencyStore.
Definition at line 68 of file KeyValueDependencyStore.php.
References $blob, $type, and Wikimedia\DependencyStore\KeyValueDependencyStore\getStoreKey().
|
private |
Definition at line 38 of file KeyValueDependencyStore.php.
Referenced by Wikimedia\DependencyStore\KeyValueDependencyStore\__construct().