Go to the documentation of this file.
40 if ( isset( self::$instances[$id] ) ) {
41 return self::$instances[$id];
45 self::$instances[$id] = $object;
53 self::$instances =
array();
67 if ( !isset( $wgObjectCaches[$id] ) ) {
68 throw new MWException(
"Invalid object cache type \"$id\" requested. " .
69 "It is not present in \$wgObjectCaches." );
84 if ( isset(
$params[
'factory'] ) ) {
86 } elseif ( isset(
$params[
'class'] ) ) {
90 throw new MWException(
"The definition of cache type \"" . print_r(
$params,
true ) .
"\" lacks both " .
91 "factory and class parameters." );
110 foreach ( $candidates
as $candidate ) {
126 if ( function_exists(
'apc_fetch' ) ) {
128 } elseif ( function_exists(
'xcache_get' ) &&
wfIniGetBool(
'xcache.var_size' ) ) {
130 } elseif ( function_exists(
'wincache_ucache_get' ) ) {
133 throw new MWException(
"CACHE_ACCEL requested but no suitable object " .
134 "cache is present. You may want to install APC." );
static clear()
Clear all the cached instances.
static newFromId( $id)
Create a new cache object of the specified type.
Functions to get cache objects.
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
A wrapper class for the pure-PHP memcached client, exposing a BagOStuff interface.
static newAnything( $params)
Factory function referenced from DefaultSettings.php for CACHE_ANYTHING.
static newMemcached( $params)
Factory function that creates a memcached client object.
static getInstance( $id)
Get a cached instance of the specified type of cache object.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
when a variable name is used in a it is silently declared as a new masking the global
static newAccelerator( $params)
Factory function referenced from DefaultSettings.php for CACHE_ACCEL.
wfIniGetBool( $setting)
Safety wrapper around ini_get() for boolean settings.
CACHE_MEMCACHED $wgMainCacheType
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
static newFromParams( $params)
Create a new cache object from parameters.