Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Lib\StatsdRecordingSimpleCache Class Reference

Simple CacheInterface that increments a statsd metric based on the number of cache misses that occur. More...

+ Inheritance diagram for Wikibase\Lib\StatsdRecordingSimpleCache:
+ Collaboration diagram for Wikibase\Lib\StatsdRecordingSimpleCache:

Public Member Functions

 __construct (CacheInterface $inner, StatsdDataFactoryInterface $stats, array $statsKeys)
 
 get ( $key, $default=null)
 
 set ( $key, $value, $ttl=null)
 
 delete ( $key)
 
 clear ()
 
 getMultiple ( $keys, $default=null)
 
 setMultiple ( $values, $ttl=null)
 
 deleteMultiple ( $keys)
 
 has ( $key)
 

Private Member Functions

 recordMisses (int $count)
 
 recordHits (int $count)
 

Private Attributes

const DEFAULT_VALUE = __CLASS__ . '-default'
 
 $inner
 
 $stats
 
 $statsKeys
 

Detailed Description

Simple CacheInterface that increments a statsd metric based on the number of cache misses that occur.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lib\StatsdRecordingSimpleCache::__construct ( CacheInterface $inner,
StatsdDataFactoryInterface $stats,
array $statsKeys )
Parameters
CacheInterface$inner
StatsdDataFactoryInterface$stats
string[]$statsKeys

Member Function Documentation

◆ clear()

Wikibase\Lib\StatsdRecordingSimpleCache::clear ( )

◆ delete()

Wikibase\Lib\StatsdRecordingSimpleCache::delete ( $key)

◆ deleteMultiple()

Wikibase\Lib\StatsdRecordingSimpleCache::deleteMultiple ( $keys)

◆ get()

Wikibase\Lib\StatsdRecordingSimpleCache::get ( $key,
$default = null )

◆ getMultiple()

Wikibase\Lib\StatsdRecordingSimpleCache::getMultiple ( $keys,
$default = null )

◆ has()

Wikibase\Lib\StatsdRecordingSimpleCache::has ( $key)

◆ recordHits()

Wikibase\Lib\StatsdRecordingSimpleCache::recordHits ( int $count)
private

◆ recordMisses()

Wikibase\Lib\StatsdRecordingSimpleCache::recordMisses ( int $count)
private

◆ set()

Wikibase\Lib\StatsdRecordingSimpleCache::set ( $key,
$value,
$ttl = null )

◆ setMultiple()

Wikibase\Lib\StatsdRecordingSimpleCache::setMultiple ( $values,
$ttl = null )

Member Data Documentation

◆ $inner

Wikibase\Lib\StatsdRecordingSimpleCache::$inner
private

◆ $stats

Wikibase\Lib\StatsdRecordingSimpleCache::$stats
private

◆ $statsKeys

Wikibase\Lib\StatsdRecordingSimpleCache::$statsKeys
private

◆ DEFAULT_VALUE

const Wikibase\Lib\StatsdRecordingSimpleCache::DEFAULT_VALUE = __CLASS__ . '-default'
private

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