Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
CachedMessageIndex Class Reference

Storage on the object cache. More...

Inheritance diagram for CachedMessageIndex:
MessageIndex

Public Member Functions

 retrieve (bool $readLatest=false)
 
- Public Member Functions inherited from MessageIndex
 getKeys ()
 
 rebuild (float $timestamp=null)
 Creates the index from scratch.
 
 getStatusCacheKey ()
 
 storeInterim (MessageGroup $group, array $newKeys)
 

Protected Member Functions

 store (array $array, array $diff)
 
- Protected Member Functions inherited from MessageIndex
 get ( $key)
 Looks up the stored value for single key.
 
 lock ()
 
 unlock ()
 
 clearMessageGroupStats (array $diff)
 Purge stuff when set of keys have changed.
 
 checkAndAdd (&$hugearray, MessageGroup $g, $ignore=false)
 
 serialize ( $data)
 These are probably slower than serialize and unserialize, but they are more space efficient because we only need strings and arrays.
 
 unserialize ( $data)
 

Protected Attributes

 $key = 'translate-messageindex'
 
 $cache
 
 $index
 
- Protected Attributes inherited from MessageIndex
 $interimCache
 

Additional Inherited Members

- Static Public Member Functions inherited from MessageIndex
static singleton ()
 
static setInstance (self $instance)
 Override the global instance, for testing.
 
static getGroupIds (MessageHandle $handle)
 Retrieves a list of groups given MessageHandle belongs to.
 
static getPrimaryGroupId (MessageHandle $handle)
 
static getArrayDiff (array $old, array $new)
 Compares two associative arrays.
 
- Static Protected Attributes inherited from MessageIndex
static $instance
 

Detailed Description

Storage on the object cache.

This can be faster than DatabaseMessageIndex, but it doesn't provide random access, and the data is not guaranteed to be persistent.

This is unlikely to be the best backend for you, so don't use it.

Definition at line 602 of file MessageIndex.php.

Constructor & Destructor Documentation

◆ __construct()

CachedMessageIndex::__construct ( )
protected

Reimplemented from MessageIndex.

Definition at line 608 of file MessageIndex.php.

Member Function Documentation

◆ retrieve()

CachedMessageIndex::retrieve ( bool $readLatest = false)

Reimplemented from MessageIndex.

Definition at line 613 of file MessageIndex.php.

◆ store()

CachedMessageIndex::store ( array $array,
array $diff )
protected

Reimplemented from MessageIndex.

Definition at line 629 of file MessageIndex.php.

Member Data Documentation

◆ $cache

CachedMessageIndex::$cache
protected

Definition at line 604 of file MessageIndex.php.

◆ $index

CachedMessageIndex::$index
protected

Definition at line 606 of file MessageIndex.php.

◆ $key

CachedMessageIndex::$key = 'translate-messageindex'
protected

Definition at line 603 of file MessageIndex.php.


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