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 $innner, 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)
 

Public Attributes

const DEFAULT_VALUE = __CLASS__ . '-default'
 

Private Member Functions

 recordMisses ( $count)
 
 recordHits ( $count)
 

Private Attributes

 $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  $innner,
StatsdDataFactoryInterface  $stats,
array  $statsKeys 
)
Parameters
CacheInterface$innner
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 (   $count)
private

◆ recordMisses()

Wikibase\Lib\StatsdRecordingSimpleCache::recordMisses (   $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'

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