MediaWiki master
|
Track per-module dependency file paths that are expensive to mass compute. More...
Public Member Functions | |
__construct (BagOStuff $stash) | |
newEntityDependencies (array $paths=[], $asOf=null) | |
remove ( $entities) | |
Delete the currently tracked dependencies for an entity or set of entities. | |
retrieve ( $entity) | |
Get the currently tracked dependencies for an entity. | |
retrieveMulti (array $entities) | |
Get the currently tracked dependencies for a set of entities. | |
storeMulti (array $pathByEntity) | |
Public Attributes | |
array | $updateBuffer = [] |
Map of (module-variant => buffered DependencyStore updates) | |
Protected Attributes | |
const | KEY_AS_OF = 'asOf' |
const | KEY_PATHS = 'paths' |
Track per-module dependency file paths that are expensive to mass compute.
Definition at line 33 of file DependencyStore.php.
Wikimedia\DependencyStore\DependencyStore::__construct | ( | BagOStuff | $stash | ) |
BagOStuff | $stash | Storage backend |
Definition at line 49 of file DependencyStore.php.
Wikimedia\DependencyStore\DependencyStore::newEntityDependencies | ( | array | $paths = [], |
$asOf = null ) |
string[] | $paths | List of dependency paths |
int | null | $asOf | UNIX timestamp or null |
Definition at line 58 of file DependencyStore.php.
Referenced by Wikimedia\DependencyStore\DependencyStore\retrieveMulti(), and Wikimedia\DependencyStore\DependencyStore\storeMulti().
Wikimedia\DependencyStore\DependencyStore::remove | ( | $entities | ) |
Delete the currently tracked dependencies for an entity or set of entities.
string | string[] | $entities | Entity name(s) |
Definition at line 175 of file DependencyStore.php.
|
final |
Get the currently tracked dependencies for an entity.
The "paths" field contains a sorted list of unique paths
The "asOf" field reflects the last-modified timestamp of the dependency data itself. It will be null if there is no tracking data available. Note that if empty path lists are never stored (as an optimisation) then it will not be possible to discern whether the result is up-to-date.
string | $entity | Entity name |
Definition at line 75 of file DependencyStore.php.
References Wikimedia\DependencyStore\DependencyStore\retrieveMulti().
Wikimedia\DependencyStore\DependencyStore::retrieveMulti | ( | array | $entities | ) |
Get the currently tracked dependencies for a set of entities.
string[] | $entities | Entity names |
Definition at line 85 of file DependencyStore.php.
References Wikimedia\DependencyStore\DependencyStore\newEntityDependencies().
Referenced by Wikimedia\DependencyStore\DependencyStore\retrieve().
Wikimedia\DependencyStore\DependencyStore::storeMulti | ( | array | $pathByEntity | ) |
array | $pathByEntity |
Definition at line 109 of file DependencyStore.php.
References Wikimedia\DependencyStore\DependencyStore\newEntityDependencies().
array Wikimedia\DependencyStore\DependencyStore::$updateBuffer = [] |
Map of (module-variant => buffered DependencyStore updates)
Definition at line 44 of file DependencyStore.php.
|
protected |
Definition at line 35 of file DependencyStore.php.
|
protected |
Definition at line 34 of file DependencyStore.php.