Manual:$wgMemc

From Linux Web Expert

Revision as of 02:03, 29 October 2022 by imported>Shirayuki (update)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

File:OOjs UI icon notice-destructive.svg <translate> Warning:</translate> It is recommended you use the WANObjectCache service. However, if you really need the internal object, use ObjectCache::getLocalClusterInstance instead.

$wgMemc is the global variable used to access the main cache. It is set in Setup.php :

$wgMemc = ObjectCache::getLocalClusterInstance();

wfGetMainCache()

<translate> (deprecated in <tvar name=2>1.32</tvar>)</translate> Past global function wfGetMainCache() defined in Manual:GlobalFunctions.php as follows:

function wfGetMainCache() {
	return ObjectCache::getLocalClusterInstance();
}

For documentation of the generic class instance it contains, see BagOStuff.

See also