MediaWiki REL1_40
|
Singleton cache for Metric instances. More...
Public Member Functions | |
clear () | |
Clears the cache. | |
get (string $component, string $name, string $expectedClass) | |
Get a metric object from cache or null. | |
getAllMetrics () | |
Get all metrics from cache. | |
set (string $component, string $name, $metric) | |
Add a metric object to the cache. | |
Singleton cache for Metric instances.
For reuse and collision avoidance. Serves as the data source for Metric Renderers.
Definition at line 37 of file StatsCache.php.
Wikimedia\Stats\StatsCache::clear | ( | ) |
Wikimedia\Stats\StatsCache::get | ( | string | $component, |
string | $name, | ||
string | $expectedClass ) |
Get a metric object from cache or null.
string | $component | |
string | $name | |
string | $expectedClass |
TypeError | If cached value is for a different metric type. |
Definition at line 53 of file StatsCache.php.
Wikimedia\Stats\StatsCache::getAllMetrics | ( | ) |
Wikimedia\Stats\StatsCache::set | ( | string | $component, |
string | $name, | ||
$metric ) |
Add a metric object to the cache.
string | $component | |
string | $name | |
MetricInterface | NullMetric | $metric |
Definition at line 70 of file StatsCache.php.