MediaWiki  master
MessageCache Class Reference

Cache of messages that are defined by MediaWiki namespace pages or by hooks. More...

Inheritance diagram for MessageCache:
Collaboration diagram for MessageCache:

Public Member Functions

 __construct (WANObjectCache $wanCache, BagOStuff $clusterCache, BagOStuff $serverCache, Language $contLang, ILanguageConverter $contLangConverter, LoggerInterface $logger, array $options, LanguageFactory $langFactory, LocalisationCache $localisationCache, LanguageNameUtils $languageNameUtils, LanguageFallback $languageFallback, HookContainer $hookContainer)
 
 clear ()
 Clear all stored messages in global and local cache. More...
 
 disable ()
 
 enable ()
 
 figureMessage ( $key)
 
 get ( $key, $useDB=true, $langcode=true)
 Get a message from either the content language or the user language. More...
 
 getAllMessageKeys ( $code)
 Get all message keys stored in the message cache for a given language. More...
 
 getCheckKey ( $code)
 
 getMsgFromNamespace ( $title, $code)
 Get a message from the MediaWiki namespace, with caching. More...
 
 getParser ()
 
 isDisabled ()
 Whether DB/cache usage is disabled for determining messages. More...
 
 parse ( $text, PageReference $page=null, $linestart=true, $interface=false, $language=null)
 
 refreshAndReplaceInternal ( $code, array $replacements)
 
 replace ( $title, $text)
 Updates cache as necessary when message page is changed. More...
 
 setLogger (LoggerInterface $logger)
 
 transform ( $message, $interface=false, $language=null, PageReference $page=null)
 
 updateMessageOverride (LinkTarget $linkTarget, Content $content=null)
 Purge message caches when a MediaWiki: page is created, updated, or deleted. More...
 

Static Public Member Functions

static normalizeKey ( $key)
 Normalize message key input. More...
 

Protected Member Functions

 getLocalCache ( $code)
 Try to load the cache from APC. More...
 
 getMessageFromFallbackChain ( $lang, $lckey, $useDB)
 Given a language, try and fetch messages from that language. More...
 
 getReentrantScopedLock ( $key, $timeout=self::WAIT_SEC)
 
 getValidationHash ( $code)
 Get the md5 used to validate the local APC cache. More...
 
 isCacheExpired ( $cache)
 Is the given cache array expired due to time passing or a version change? More...
 
 load ( $code, $mode=null)
 Loads messages from caches or from database in this order: (1) local message cache (if $wgUseLocalMessageCache is enabled) (2) memcached (3) from the database. More...
 
 loadFromDB ( $code, $mode=null)
 Loads cacheable messages from the database. More...
 
 loadFromDBWithLock ( $code, array &$where, $mode=null)
 
 saveToCaches (array $cache, $dest, $code=false)
 Shortcut to update caches. More...
 
 saveToLocalCache ( $code, $cache)
 Save the cache to APC. More...
 
 setValidationHash ( $code, array $cache)
 Set the md5 used to validate the local disk cache. More...
 

Protected Attributes

MapCacheLRU $cache
 Process cache of loaded messages that are defined in MediaWiki namespace. More...
 
bool[] $cacheVolatile = []
 Map of (language code => boolean) More...
 
BagOStuff $clusterCache
 
Language $contLang
 
string $contLangCode
 
ILanguageConverter $contLangConverter
 
LanguageFactory $langFactory
 
LanguageFallback $languageFallback
 
LanguageNameUtils $languageNameUtils
 
LocalisationCache $localisationCache
 
bool $mDisable
 Should mean that database cannot be used, but check. More...
 
bool $mInParser = false
 
Parser $mParser
 
ParserOptions $mParserOptions
 Message cache has its own parser which it uses to transform messages. More...
 
BagOStuff $srvCache
 
WANObjectCache $wanCache
 

Private Member Functions

 bigMessageCacheKey ( $hash, $title)
 
 getMessageForLang ( $lang, $lckey, $useDB, &$alreadyTried)
 Given a language, try and fetch messages from that language and its fallbacks. More...
 
 getMessagePageName ( $langcode, $uckey)
 Get the message page name for a given language. More...
 
 getMessageTextFromContent (Content $content=null)
 
 getParserOptions ()
 ParserOptions is lazy initialised. More...
 
 isLanguageLoaded ( $lang)
 Whether the language was loaded and its data is still in the process cache. More...
 
 isMainCacheable ( $name, $code=null)
 Can the given DB key be added to the main cache blob? To reduce the impact of abuse of the MediaWiki namespace by {{int:}} and CentralNotice, this is only true if the page overrides a predefined message. More...
 
 loadCachedMessagePageEntry ( $dbKey, $code, $hash)
 

Private Attributes

HookRunner $hookRunner
 
LoggerInterface $logger
 
array $systemMessageNames
 Map of (lowercase message key => unused) for all software defined messages. More...
 
const FOR_UPDATE = 1
 
const LOCK_TTL = 30
 How long memcached locks last. More...
 
const WAIT_SEC = 15
 How long to wait for memcached locks. More...
 

Detailed Description

Cache of messages that are defined by MediaWiki namespace pages or by hooks.

Performs various MediaWiki namespace-related functions

Definition at line 52 of file MessageCache.php.

Constructor & Destructor Documentation

◆ __construct()

MessageCache::__construct ( WANObjectCache  $wanCache,
BagOStuff  $clusterCache,
BagOStuff  $serverCache,
Language  $contLang,
ILanguageConverter  $contLangConverter,
LoggerInterface  $logger,
array  $options,
LanguageFactory  $langFactory,
LocalisationCache  $localisationCache,
LanguageNameUtils  $languageNameUtils,
LanguageFallback  $languageFallback,
HookContainer  $hookContainer 
)
Access: internal
For use by ServiceWiring
Parameters
WANObjectCache$wanCache
BagOStuff$clusterCache
BagOStuff$serverCache
Language$contLangContent language of site
ILanguageConverter$contLangConverterContent language converter for site
LoggerInterface$logger
array$options
  • useDB (bool): Whether to allow message overrides from "MediaWiki:" pages. Default: true.
LanguageFactory$langFactory
LocalisationCache$localisationCache
LanguageNameUtils$languageNameUtils
LanguageFallback$languageFallback
HookContainer$hookContainer

Definition at line 164 of file MessageCache.php.

References $clusterCache, $contLang, $contLangConverter, $langFactory, $languageFallback, $languageNameUtils, $localisationCache, $logger, $wanCache, Language\getCode(), and true.

Member Function Documentation

◆ bigMessageCacheKey()

MessageCache::bigMessageCacheKey (   $hash,
  $title 
)
private
Parameters
string$hashHash for this version of the entire key/value overrides map
string$titleMessage cache key with initial uppercase letter
Returns
string

Definition at line 1464 of file MessageCache.php.

References $title.

Referenced by loadCachedMessagePageEntry(), and refreshAndReplaceInternal().

◆ clear()

MessageCache::clear ( )

Clear all stored messages in global and local cache.

Mainly used after a mass rebuild

Definition at line 1349 of file MessageCache.php.

References getCheckKey().

◆ disable()

MessageCache::disable ( )

Definition at line 1320 of file MessageCache.php.

◆ enable()

MessageCache::enable ( )

Definition at line 1324 of file MessageCache.php.

◆ figureMessage()

MessageCache::figureMessage (   $key)
Parameters
string$key
Returns
array

Definition at line 1361 of file MessageCache.php.

References $contLangCode, and $lang.

Referenced by replace().

◆ get()

MessageCache::get (   $key,
  $useDB = true,
  $langcode = true 
)

Get a message from either the content language or the user language.

First, assemble a list of languages to attempt getting the message from. This chain begins with the requested language and its fallbacks and then continues with the content language and its fallbacks. For each language in the chain, the following process will occur (in this order):

  1. If a language-specific override, i.e., [[MW:msg/lang]], is available, use that. Note: for the content language, there is no /lang subpage.
  2. Fetch from the static CDB cache.
  3. If available, check the database for fallback language overrides.

This process provides a number of guarantees. When changing this code, make sure all of these guarantees are preserved.

  • If the requested language is not the content language, then the CDB cache for that specific language will take precedence over the root database page ([[MW:msg]]).
  • Fallbacks will be just that: fallbacks. A fallback language will never be reached if the message is available anywhere in the language for which it is a fallback.
Parameters
string$keyThe message key
bool$useDBIf true, look for the message in the DB, false to use only the compiled l10n cache.
bool | string | Language$langcodeCode of the language to get the message for.
  • If string and a valid code, will create a standard language object
  • If string but not a valid code, will create a basic language object
  • If boolean and false, create object from the current users language
  • If boolean and true, create object from the wikis content language
  • If language object, use it as given
Exceptions
MWExceptionWhen given an invalid key
Returns
string|false False if the message doesn't exist, otherwise the message (which can be empty)

Definition at line 923 of file MessageCache.php.

References getMessageFromFallbackChain(), normalizeKey(), and wfGetLangObj().

◆ getAllMessageKeys()

MessageCache::getAllMessageKeys (   $code)

Get all message keys stored in the message cache for a given language.

If $code is the content language code, this will return all message keys for which MediaWiki:msgkey exists. If $code is another language code, this will ONLY return message keys for which MediaWiki:msgkey/$code exists.

Parameters
string$codeLanguage code
Returns
string[] Array of message keys

Definition at line 1385 of file MessageCache.php.

References $cache, MapCacheLRU\get(), and load().

◆ getCheckKey()

MessageCache::getCheckKey (   $code)
Parameters
string$codeLanguage code
Returns
string WAN cache key usable as a "check key" against language page edits

Definition at line 1427 of file MessageCache.php.

Referenced by clear(), and refreshAndReplaceInternal().

◆ getLocalCache()

MessageCache::getLocalCache (   $code)
protected

Try to load the cache from APC.

Parameters
string$codeOptional language code, see documentation of load().
Returns
array|false The cache array, or false if not in cache.

Definition at line 235 of file MessageCache.php.

Referenced by load().

◆ getMessageForLang()

MessageCache::getMessageForLang (   $lang,
  $lckey,
  $useDB,
$alreadyTried 
)
private

Given a language, try and fetch messages from that language and its fallbacks.

See also
MessageCache::get
Parameters
Language | StubObject$langPreferred language
string$lckeyLowercase key for the message (as for localisation cache)
bool$useDBWhether to include messages from the wiki database
bool[]&$alreadyTriedContains true for each language that has been tried already
Returns
string|false The message, or false if not found

Definition at line 1022 of file MessageCache.php.

References $lang, getMessagePageName(), and getMsgFromNamespace().

Referenced by getMessageFromFallbackChain().

◆ getMessageFromFallbackChain()

MessageCache::getMessageFromFallbackChain (   $lang,
  $lckey,
  $useDB 
)
protected

Given a language, try and fetch messages from that language.

Will also consider fallbacks of that language, the site language, and fallbacks for the site language.

See also
MessageCache::get
Parameters
Language | StubObject$langPreferred language
string$lckeyLowercase key for the message (as for localisation cache)
bool$useDBWhether to include messages from the wiki database
Returns
string|false The message, or false if not found

Definition at line 998 of file MessageCache.php.

References $lang, and getMessageForLang().

Referenced by get().

◆ getMessagePageName()

MessageCache::getMessagePageName (   $langcode,
  $uckey 
)
private

Get the message page name for a given language.

Parameters
string$langcode
string$uckeyUppercase key for the message
Returns
string The page name

Definition at line 1078 of file MessageCache.php.

Referenced by getMessageForLang().

◆ getMessageTextFromContent()

MessageCache::getMessageTextFromContent ( Content  $content = null)
private
Parameters
Content | null$contentContent or null if the message page does not exist
Returns
string|false|null Returns false if $content is null and null on error

Definition at line 1435 of file MessageCache.php.

References $content.

Referenced by loadCachedMessagePageEntry(), loadFromDB(), refreshAndReplaceInternal(), and updateMessageOverride().

◆ getMsgFromNamespace()

MessageCache::getMsgFromNamespace (   $title,
  $code 
)

Get a message from the MediaWiki namespace, with caching.

The key must first be converted to two-part lang/msg form if necessary.

Unlike self::get(), this function doesn't resolve fallback chains, and some callers require this behavior. LanguageConverter::parseCachedTable() and self::get() are some examples in core.

Parameters
string$titleMessage cache key with initial uppercase letter
string$codeCode denoting the language to try
Returns
string|false The message, or false if it does not exist or on error

Definition at line 1099 of file MessageCache.php.

References $title, isMainCacheable(), load(), and loadCachedMessagePageEntry().

Referenced by getMessageForLang().

◆ getParser()

MessageCache::getParser ( )
Returns
Parser

Definition at line 1259 of file MessageCache.php.

References $mParser.

Referenced by parse(), and transform().

◆ getParserOptions()

MessageCache::getParserOptions ( )
private

ParserOptions is lazy initialised.

Returns
ParserOptions

Definition at line 206 of file MessageCache.php.

References $mParserOptions, RequestContext\getMain(), ParserOptions\newFromAnon(), and ParserOptions\newFromContext().

Referenced by parse(), and transform().

◆ getReentrantScopedLock()

MessageCache::getReentrantScopedLock (   $key,
  $timeout = self::WAIT_SEC 
)
protected
Parameters
string$keyA language message cache key that stores blobs
int$timeoutWait timeout in seconds
Returns
null|ScopedCallback

Definition at line 886 of file MessageCache.php.

Referenced by load(), loadFromDBWithLock(), and refreshAndReplaceInternal().

◆ getValidationHash()

MessageCache::getValidationHash (   $code)
protected

Get the md5 used to validate the local APC cache.

Parameters
string$code
Returns
array (hash or false, bool expiry/volatility status)

Definition at line 832 of file MessageCache.php.

Referenced by load().

◆ isCacheExpired()

MessageCache::isCacheExpired (   $cache)
protected

Is the given cache array expired due to time passing or a version change?

Parameters
array$cache
Returns
bool

Definition at line 789 of file MessageCache.php.

References $cache, MSG_CACHE_VERSION, and wfTimestampNow().

Referenced by load().

◆ isDisabled()

MessageCache::isDisabled ( )

Whether DB/cache usage is disabled for determining messages.

If so, this typically indicates either:

  • a) load() failed to find a cached copy nor query the DB
  • b) we are in a special context or error mode that cannot use the DB If the DB is ignored, any derived HTML output or cached objects may be wrong. To avoid long-term cache pollution, TTLs can be adjusted accordingly.
Returns
bool
Since
1.27

Definition at line 1340 of file MessageCache.php.

References $mDisable.

◆ isLanguageLoaded()

MessageCache::isLanguageLoaded (   $lang)
private

Whether the language was loaded and its data is still in the process cache.

Parameters
string$lang
Returns
bool

Definition at line 617 of file MessageCache.php.

References $lang.

Referenced by load().

◆ isMainCacheable()

MessageCache::isMainCacheable (   $name,
  $code = null 
)
private

Can the given DB key be added to the main cache blob? To reduce the impact of abuse of the MediaWiki namespace by {{int:}} and CentralNotice, this is only true if the page overrides a predefined message.

Parameters
string$nameMessage name (possibly with /code suffix)
string | null$codeThe language code. If this is null, message presence will be bulk loaded for the content language. Otherwise, presence will be detected by loading the specified message.
Returns
bool

Definition at line 638 of file MessageCache.php.

Referenced by getMsgFromNamespace(), and loadFromDB().

◆ load()

MessageCache::load (   $code,
  $mode = null 
)
protected

Loads messages from caches or from database in this order: (1) local message cache (if $wgUseLocalMessageCache is enabled) (2) memcached (3) from the database.

When successfully loading from (2) or (3), all higher level caches are updated for the newest version.

Nothing is loaded if member variable mDisable is true, either manually set by calling code or if message loading fails (is this possible?).

Returns true if cache is already populated or it was successfully populated, or false if populating empty cache fails. Also returns true if MessageCache is disabled.

Parameters
string$codeLanguage to which load messages
int | null$modeUse MessageCache::FOR_UPDATE to skip process cache [optional]
Exceptions
InvalidArgumentException
Returns
bool

Definition at line 273 of file MessageCache.php.

References $cache, $success, MapCacheLRU\get(), getLocalCache(), getReentrantScopedLock(), getValidationHash(), isCacheExpired(), isLanguageLoaded(), loadFromDBWithLock(), saveToCaches(), and MapCacheLRU\set().

Referenced by getAllMessageKeys(), getMsgFromNamespace(), loadFromDB(), and refreshAndReplaceInternal().

◆ loadCachedMessagePageEntry()

MessageCache::loadCachedMessagePageEntry (   $dbKey,
  $code,
  $hash 
)
private
Parameters
string$dbKey
string$code
string$hash
Returns
string Either " <MESSAGE>" or "!NONEXISTANT"

Definition at line 1173 of file MessageCache.php.

References $content, $title, bigMessageCacheKey(), DB_REPLICA, getMessageTextFromContent(), Title\makeTitle(), NS_MEDIAWIKI, and wfGetDB().

Referenced by getMsgFromNamespace().

◆ loadFromDB()

MessageCache::loadFromDB (   $code,
  $mode = null 
)
protected

Loads cacheable messages from the database.

Messages bigger than $wgMaxMsgCacheEntrySize are assigned a special value, and are loaded on-demand from the database later.

Parameters
string$codeLanguage code
int | null$modeUse MessageCache::FOR_UPDATE to skip process cache
Returns
array Loaded messages for storing in caches

Definition at line 478 of file MessageCache.php.

References $cache, $content, $dbr, $res, $revQuery, $wgAdaptiveMessageCache, $wgMaxMsgCacheEntrySize, DB_PRIMARY, DB_REPLICA, getMessageTextFromContent(), isMainCacheable(), load(), MSG_CACHE_VERSION, NS_MEDIAWIKI, serialize(), wfGetDB(), and wfTimestamp().

Referenced by loadFromDBWithLock(), and refreshAndReplaceInternal().

◆ loadFromDBWithLock()

MessageCache::loadFromDBWithLock (   $code,
array &  $where,
  $mode = null 
)
protected
Parameters
string$code
string[]&$whereList of debug comments
int | null$modeUse MessageCache::FOR_UPDATE to use DB_PRIMARY
Returns
true|string True on success or one of ("cantacquire", "disabled")

Definition at line 416 of file MessageCache.php.

References $cache, getReentrantScopedLock(), loadFromDB(), and saveToCaches().

Referenced by load().

◆ normalizeKey()

static MessageCache::normalizeKey (   $key)
static

Normalize message key input.

Parameters
string$keyInput message key to be normalized
Returns
string Normalized message key

Definition at line 136 of file MessageCache.php.

Referenced by ApiQueryAllMessages\execute(), and get().

◆ parse()

MessageCache::parse (   $text,
PageReference  $page = null,
  $linestart = true,
  $interface = false,
  $language = null 
)
Parameters
string$text
PageReference | null$page
bool$linestartWhether or not this is at the start of a line
bool$interfaceWhether this is an interface message
Language | string | null$languageLanguage code
Returns
ParserOutput|string

Definition at line 1277 of file MessageCache.php.

References $logger, $res, $wgTitle, getParser(), getParserOptions(), and NS_SPECIAL.

◆ refreshAndReplaceInternal()

MessageCache::refreshAndReplaceInternal (   $code,
array  $replacements 
)

◆ replace()

MessageCache::replace (   $title,
  $text 
)

Updates cache as necessary when message page is changed.

Parameters
string$titleMessage cache key with initial uppercase letter
string | false$textNew contents of the page (false if deleted)

Definition at line 668 of file MessageCache.php.

References $title, DeferredUpdates\addUpdate(), and figureMessage().

Referenced by updateMessageOverride().

◆ saveToCaches()

MessageCache::saveToCaches ( array  $cache,
  $dest,
  $code = false 
)
protected

Shortcut to update caches.

Parameters
array$cacheCached messages with a version.
string$destEither "local-only" to save to local caches only or "all" to save to all caches.
string | false$codeLanguage code (default: false)
Returns
bool

Definition at line 812 of file MessageCache.php.

References $cache, $success, saveToLocalCache(), and setValidationHash().

Referenced by load(), loadFromDBWithLock(), and refreshAndReplaceInternal().

◆ saveToLocalCache()

MessageCache::saveToLocalCache (   $code,
  $cache 
)
protected

Save the cache to APC.

Parameters
string$code
array$cacheThe cache array

Definition at line 247 of file MessageCache.php.

References $cache.

Referenced by saveToCaches().

◆ setLogger()

MessageCache::setLogger ( LoggerInterface  $logger)

Definition at line 197 of file MessageCache.php.

References $logger.

◆ setValidationHash()

MessageCache::setValidationHash (   $code,
array  $cache 
)
protected

Set the md5 used to validate the local disk cache.

If $cache has a 'LATEST' UNIX timestamp key, then the hash will not be treated as "volatile" by getValidationHash() for the next few seconds. This is triggered when $cache is generated using FOR_UPDATE mode.

Parameters
string$code
array$cacheCached messages with a version

Definition at line 870 of file MessageCache.php.

References $cache.

Referenced by saveToCaches().

◆ transform()

MessageCache::transform (   $message,
  $interface = false,
  $language = null,
PageReference  $page = null 
)
Parameters
string$message
bool$interface
Language | null$language
PageReference | null$page
Returns
string

Definition at line 1230 of file MessageCache.php.

References getParser(), and getParserOptions().

Referenced by EmailNotification\composeCommonMailtext().

◆ updateMessageOverride()

MessageCache::updateMessageOverride ( LinkTarget  $linkTarget,
Content  $content = null 
)

Purge message caches when a MediaWiki: page is created, updated, or deleted.

Parameters
LinkTarget$linkTargetMessage page title
Content | null$contentNew content for edit/create, null on deletion
Since
1.29

Definition at line 1410 of file MessageCache.php.

References $content, MediaWiki\Linker\LinkTarget\getDBkey(), getMessageTextFromContent(), and replace().

Member Data Documentation

◆ $cache

MapCacheLRU MessageCache::$cache
protected

Process cache of loaded messages that are defined in MediaWiki namespace.

Map of (language code => key => " <MESSAGE>" or "!TOO BIG" or "!ERROR")

Definition at line 74 of file MessageCache.php.

Referenced by getAllMessageKeys(), isCacheExpired(), load(), loadFromDB(), loadFromDBWithLock(), refreshAndReplaceInternal(), saveToCaches(), saveToLocalCache(), and setValidationHash().

◆ $cacheVolatile

bool [] MessageCache::$cacheVolatile = []
protected

Map of (language code => boolean)

Definition at line 86 of file MessageCache.php.

◆ $clusterCache

BagOStuff MessageCache::$clusterCache
protected

Definition at line 110 of file MessageCache.php.

Referenced by __construct().

◆ $contLang

Language MessageCache::$contLang
protected

Definition at line 114 of file MessageCache.php.

Referenced by __construct().

◆ $contLangCode

string MessageCache::$contLangCode
protected

Definition at line 116 of file MessageCache.php.

Referenced by figureMessage().

◆ $contLangConverter

ILanguageConverter MessageCache::$contLangConverter
protected

Definition at line 118 of file MessageCache.php.

Referenced by __construct().

◆ $hookRunner

HookRunner MessageCache::$hookRunner
private

Definition at line 128 of file MessageCache.php.

◆ $langFactory

LanguageFactory MessageCache::$langFactory
protected

Definition at line 120 of file MessageCache.php.

Referenced by __construct().

◆ $languageFallback

LanguageFallback MessageCache::$languageFallback
protected

Definition at line 126 of file MessageCache.php.

Referenced by __construct().

◆ $languageNameUtils

LanguageNameUtils MessageCache::$languageNameUtils
protected

Definition at line 124 of file MessageCache.php.

Referenced by __construct().

◆ $localisationCache

LocalisationCache MessageCache::$localisationCache
protected

Definition at line 122 of file MessageCache.php.

Referenced by __construct().

◆ $logger

LoggerInterface MessageCache::$logger
private
Initial value:
=
private const WAN_TTL IExpiringStore::TTL_DAY

Definition at line 67 of file MessageCache.php.

Referenced by __construct(), parse(), and setLogger().

◆ $mDisable

bool MessageCache::$mDisable
protected

Should mean that database cannot be used, but check.

Definition at line 92 of file MessageCache.php.

Referenced by isDisabled().

◆ $mInParser

bool MessageCache::$mInParser = false
protected

Definition at line 105 of file MessageCache.php.

◆ $mParser

Parser MessageCache::$mParser
protected

Definition at line 100 of file MessageCache.php.

Referenced by getParser().

◆ $mParserOptions

ParserOptions MessageCache::$mParserOptions
protected

Message cache has its own parser which it uses to transform messages.

Definition at line 98 of file MessageCache.php.

Referenced by getParserOptions().

◆ $srvCache

BagOStuff MessageCache::$srvCache
protected

Definition at line 112 of file MessageCache.php.

◆ $systemMessageNames

array MessageCache::$systemMessageNames
private

Map of (lowercase message key => unused) for all software defined messages.

Definition at line 81 of file MessageCache.php.

◆ $wanCache

WANObjectCache MessageCache::$wanCache
protected

Definition at line 108 of file MessageCache.php.

Referenced by __construct().

◆ FOR_UPDATE

const MessageCache::FOR_UPDATE = 1
private

Definition at line 53 of file MessageCache.php.

◆ LOCK_TTL

const MessageCache::LOCK_TTL = 30
private

How long memcached locks last.

Definition at line 58 of file MessageCache.php.

◆ WAIT_SEC

const MessageCache::WAIT_SEC = 15
private

How long to wait for memcached locks.

Definition at line 56 of file MessageCache.php.


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