MediaWiki REL1_39
Wikimedia\DependencyStore\SqlModuleDependencyStore Class Reference

Track per-module file dependencies in the core module_deps table. More...

Inheritance diagram for Wikimedia\DependencyStore\SqlModuleDependencyStore:
Collaboration diagram for Wikimedia\DependencyStore\SqlModuleDependencyStore:

Public Member Functions

 __construct (ILoadBalancer $lb)
 
 remove ( $type, $entities)
 Delete 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.
 

Detailed Description

Track per-module file dependencies in the core module_deps table.

Wiki farms that are too big for maintenance/update.php, can clean up unneeded data for modules that no longer exist after a MW upgrade, by running maintenance/cleanupRemovedModules.php.

To force a rebuild and incurr a small penalty in browser cache churn, run maintenance/purgeModuleDeps.php instead.

Access: internal
For use by ResourceLoader\Module only
Since
1.35

Definition at line 41 of file SqlModuleDependencyStore.php.

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\DependencyStore\SqlModuleDependencyStore::__construct ( ILoadBalancer $lb)
Parameters
ILoadBalancer$lbStorage backend

Definition at line 48 of file SqlModuleDependencyStore.php.

Member Function Documentation

◆ remove()

Wikimedia\DependencyStore\SqlModuleDependencyStore::remove ( $type,
$entities )

Delete the currently tracked dependencies for an entity or set of entities.

Parameters
string$typeEntity type
string | string[]$entitiesEntity name(s)

Reimplemented from Wikimedia\DependencyStore\DependencyStore.

Definition at line 119 of file SqlModuleDependencyStore.php.

◆ retrieveMulti()

Wikimedia\DependencyStore\SqlModuleDependencyStore::retrieveMulti ( $type,
array $entities )

Get the currently tracked dependencies for a set of entities.

See also
KeyValueDependencyStore::retrieve()
Parameters
string$typeEntity type
string[]$entitiesEntity names
Returns
array[] Map of (entity => (paths: paths, asOf: UNIX timestamp or null))

Reimplemented from Wikimedia\DependencyStore\DependencyStore.

Definition at line 52 of file SqlModuleDependencyStore.php.

References $dbr, and Wikimedia\DependencyStore\DependencyStore\newEntityDependencies().

◆ storeMulti()

Wikimedia\DependencyStore\SqlModuleDependencyStore::storeMulti ( $type,
array $dataByEntity,
$ttl )

Set the currently tracked dependencies for a set of entities.

See also
KeyValueDependencyStore::store()
Parameters
string$typeEntity type
array[]$dataByEntityMap of (entity => (paths: paths, asOf: UNIX timestamp or null))
int$ttlNew time-to-live in seconds

Reimplemented from Wikimedia\DependencyStore\DependencyStore.

Definition at line 71 of file SqlModuleDependencyStore.php.

References $blob.


The documentation for this class was generated from the following file: