MediaWiki  master
docs/memcached.txt File Reference

Typedefs

using $wgMainCacheType = CACHE_MEMCACHED
 

Functions

The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array ("192.168.0.1:11211", 2))
 
storage can be distributed across multiple and multiple web servers can use the same cache cluster *********************W A R N I N G ***********************Memcached has no security or authentication Please ensure that your server is appropriately and that the port (s) used for memcached servers are not publicly accessible. Otherwise
 
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight ofserver (say, because it has twice the memory of the others and you want to spread usage evenly)
 
The wiki should then use memcached to cache various data To use multiple servers (physically separate boxes or multiple caches on one machine on a large-memory x86 box)
 

Variables

controlled by the following MediaWiki still creates a BagOStuff but calls it to it are no ops If the cache daemon can t be it should also disable itself fairly $wgDBname
 
 $wgMemCachedServers = array( "127.0.0.1:11211" )
 
storage can be distributed across multiple and multiple web servers can use the same cache cluster *********************W A R N I N G ***********************Memcached has no security or authentication Please ensure that your server is appropriately and that the anyone on the internet can put data into and read data from your cache An attacker familiar with MediaWiki internals could use this to steal passwords and email addresses
 
controlled by the following MediaWiki still creates a BagOStuff but calls it to it are no ops If the cache daemon can t be contacted
 
MediaWiki has optional support for a high distributed memory object caching system For general information on but for a larger site with heavy like it should help lighten the load on the database servers by caching data and objects in Debian
 
MediaWiki has optional support for a high distributed memory object caching system For general information on but for a larger site with heavy like it should help lighten the load on the database servers by caching data and objects in Ubuntu and probably other Linux distributions If there s no package available for your distribution
 
storage can be distributed across multiple and multiple web servers can use the same cache cluster *********************W A R N I N G ***********************Memcached has no security or authentication Please ensure that your server is appropriately firewalled
 
MediaWiki has optional support for a high distributed memory object caching system For general information on it
 
MediaWiki has optional support for a high distributed memory object caching system For general information on but for a larger site with heavy like it should help lighten the load on the database servers by caching data and objects in Ubuntu and probably other Linux distributions If there s no package available for your you can compile it from epoll rt patch for Linux kernel
 
MediaWiki has optional support for a high distributed memory object caching system For general information on but for a larger site with heavy load
 
MediaWiki has optional support for memcached
 
MediaWiki has optional support for a high distributed memory object caching system For general information on but for a larger site with heavy like it should help lighten the load on the database servers by caching data and objects in memory
 
MediaWiki has optional support for a high distributed memory object caching system For general information on but for a larger site with heavy like it should help lighten the load on the database servers by caching data and objects in Ubuntu and probably other Linux distributions If there s no package available for your you can compile it from epoll rt patch for Linux is current Memcached and libevent are under BSD style licenses The server should run on Linux and other Unix like systems you can run multiple servers on one machine or on multiple machines onnetwork
 
controlled by the following MediaWiki still creates a BagOStuff object
 
MediaWiki has optional support for a high performance
 
MediaWiki has optional support for a high distributed memory object caching system For general information on see
 
storage can be distributed across multiple servers
 
controlled by the following MediaWiki still creates a BagOStuff but calls it to it are no ops If the cache daemon can t be it should also disable itself fairly smoothly
 
MediaWiki has optional support for a high distributed memory object caching system For general information on but for a larger site with heavy like it should help lighten the load on the database servers by caching data and objects in Ubuntu and probably other Linux distributions If there s no package available for your you can compile it from source
 
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a subarray
 
controlled by the following variables
 
storage can be distributed across multiple and multiple web servers can use the same cache cluster *********************W A R N I N G ***********************Memcached has no security or authentication Please ensure that your server is appropriately and that the anyone on the internet can put data into and read data from your cache An attacker familiar with MediaWiki internals could use this to steal passwords and email or to make themselves a sysop and install malicious javascript on the site There may be other types of vulnerability
 
controlled by the following MediaWiki still creates a BagOStuff but calls it to it are no ops If the cache daemon can t be it should also disable itself fairly wikidb
 
MediaWiki has optional support for a high distributed memory object caching system For general information on but for a larger site with heavy like Wikipedia
 

Typedef Documentation

◆ $wgMainCacheType

using $wgMainCacheType = CACHE_MEMCACHED

Definition at line 63 of file memcached.txt.

Function Documentation

◆ array()

The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array ( "192.168.0.1:11211"  ,
 
)

Referenced by FormattedRCFeed::__construct(), ReverseArrayIterator::__construct(), ResourceLoaderImage::__construct(), MediaWikiTitleCodec::__construct(), FSFileBackend::__construct(), BatchRowIterator::__construct(), MagicWord::__construct(), IndexPager::__construct(), ChangesListFilterGroup::__construct(), ResourceLoaderFileModule::__construct(), Message::__construct(), MemcachedClient::__construct(), MemcachedClient::_flush_read_buffer(), MemcachedClient::_incrdecr(), MemcachedClient::_load_items(), OutputPage::addBodyClasses(), ApiBase::addDeprecation(), OutputPage::addHeadItems(), LinkCache::addLinkObj(), ApiErrorFormatter::addMessagesFromStatus(), ApiResult::addMetadataToResultVars(), OutputPage::addModules(), ParserOutput::addModules(), OutputPage::addModuleScripts(), ParserOutput::addModuleScripts(), OutputPage::addModuleStyles(), ParserOutput::addModuleStyles(), OutputPage::addParserOutputMetadata(), MediaWikiTestCase::addTmpFiles(), ApiQueryBase::addWhereRange(), ApiQuerySiteinfo::appendGeneralInfo(), ApiResult::applyTransformations(), ApiErrorFormatter::arrayFromStatus(), ApiQueryWatchlistIntegrationTest::assertArraySubsetsEqual(), ApiMoveTest::assertMoved(), MWHttpRequestTestCase::assertResponseFieldValue(), Wikimedia\Rdbms\LoadBalancer::assertTransactionRoundStage(), LinksDeletionUpdate::batchDeleteByPK(), JobQueue::batchPush(), ProfilerOutput::canUse(), Replacer::cb(), CentralIdLookup::checkAudience(), PHPVersionCheck::checkExtensionExistence(), LocalRepo::checkRedirect(), ApiBase::checkTitleUserPermissions(), ApiBase::checkUserRightsAny(), FileBackend::clean(), CleanupUsersWithNoId::cleanup(), MapCacheLRU::clear(), ResourceLoaderFileModule::collateFilePathListByOption(), UpdateLogging::copyExactMatch(), FileBackendStore::copyInternal(), MediaWikiTestCase::copyTestData(), ReverseArrayIterator::count(), FileBackendStore::createInternal(), User::createNew(), ReverseArrayIterator::current(), CommentStore::decodeMessage(), ExternalStore::defaultStoresAreReadOnly(), FileBackendStore::deleteInternal(), StringUtils::delimiterReplace(), deprecationHelperGetPropertyOwner(), FileBackendStore::directoryExists(), MemcachedClient::disconnect_all(), RecompressTracked::dispatchToReplica(), FSFileBackend::doCopyInternal(), SwiftFileBackend::doCopyInternal(), FSFileBackend::doCreateInternal(), SwiftFileBackend::doCreateInternal(), FSFileBackend::doDeleteInternal(), SwiftFileBackend::doDeleteInternal(), SwiftFileBackend::doDescribeInternal(), DBFileJournal::doGetChangeEntries(), LockManager::doLockByType(), FSFileBackend::doMoveInternal(), SwiftFileBackend::doMoveInternal(), FileBackend::doOperations(), GenderCache::doQuery(), FileBackend::doQuickOperations(), UserrightsPage::doSaveUserGroups(), FSFileBackend::doStoreInternal(), SwiftFileBackend::doStoreInternal(), ApiUserrightsTest::doSuccessfulRightsChange(), FileBackendTest::doTestGetFileContents(), FileBackendTest::doTestGetLocalCopy(), FileBackendTest::doTestGetLocalReference(), LockManager::doUnlockByType(), TextPassDumper::endElement(), ApiBase::errorArrayToStatus(), Sanitizer::escapeId(), ApiProtect::execute(), ApiQueryAllMessages::execute(), ApiQueryLangLinks::execute(), ApiQueryBlocks::execute(), ApiQueryIWLinks::execute(), ApiComparePages::execute(), ApiParse::execute(), PurgeModuleDeps::execute(), CleanupRemovedModules::execute(), ApiFeedWatchlist::execute(), ApiUserrights::execute(), ApiQueryUsers::execute(), StringUtils::explodeMarkup(), JSParser::Expression(), ExtensionProcessor::extractMessagesDirs(), WebRequest::extractTitle(), UploadStash::fetchFileMetadata(), TextPassDumper::finalOptionCheck(), LocalRepo::findFiles(), ExecutableFinder::findInDefaultPaths(), User::findUsersByGroup(), Wikimedia\Rdbms\LBFactory::forEachLBCallMethod(), MemcachedClient::forget_dead_hosts(), FeedUtils::formatDiff(), ApiAuthManagerHelper::formatRequests(), JSParser::FunctionDefinition(), MemcachedClient::get(), JSTokenizer::get(), MemcachedClient::get_multi(), MemcachedClient::get_sock(), LegacyLogFormatter::getActionMessage(), MediaWiki\Interwiki\ClassicInterwikiLookup::getAllPrefixesDB(), WebRequest::getArray(), Title::getAuthorsBetween(), QuorumLockManager::getBucketFromPath(), OOUIHTMLForm::getButtons(), VFormHTMLForm::getButtons(), HTMLForm::getButtons(), ApiQueryUsers::getCacheMode(), ApiQueryInfo::getCacheMode(), CommentStore::getCommentInternal(), SiteConfiguration::getConfig(), Wikimedia\Rdbms\LoadBalancer::getConnection(), ForeignDBFile::getDescriptionText(), File::getDescriptionText(), FileBackendStore::getDirectoryList(), MediaWikiTestCase::getExternalStoreDatabaseConnections(), FileBackend::getFileContents(), FileContentsHasher::getFileContentsHash(), ResourceLoaderModule::getFileDependencies(), FileBackendStore::getFileList(), FileBackendStore::getFileStat(), FormSpecialPage::getForm(), MediaWiki\Preferences\DefaultPreferencesFactory::getForm(), Language::getGenderNsText(), MWGrants::getGrantRights(), OutputPage::getHeadLinksArray(), TablePager::getHiddenFields(), TestUserRegistry::getImmutableTestUser(), SpecialUpload::getInitialPageText(), HTMLCheckMatrix::getInputHTML(), HTMLAutoCompleteSelectField::getInputHTML(), HTMLFormFieldCloner::getInputHTML(), HTMLFormFieldCloner::getInputOOUI(), ActorMigration::getInsertValuesWithTempTable(), Revision\RevisionStore::getKnownCurrentRevision(), ResourceLoaderClientHtml::getLoad(), MediaWiki\Tests\Revision\RevisionStoreDbTestBase::getLoadBalancerMock(), FileBackend::getLocalCopy(), FileBackendStore::getLocalCopyMulti(), FileBackend::getLocalReference(), DBLockManager::getLocksOnServer(), ApiParamInfo::getModuleInfo(), WANObjectCache::getMulti(), TestUserRegistry::getMutableTestUser(), Language::getNamespaceAliases(), ParserOutput::getOutputHooks(), ApiBase::getParameterFromSettings(), PHPVersionCheck::getPHPInfo(), FormatMetadata::getPriorityLanguages(), Revision\RevisionRenderer::getRenderedRevision(), MWNamespace::getRestrictionLevels(), ApiResult::getResultData(), FileBackend::getScopedFileLocks(), ExternalStoreDB::getSlave(), ConverterRule::getTextInBidtable(), Message::getTitle(), FileBackend::getTopDirectoryList(), FileBackend::getTopFileList(), ConvertExtensionToRegistration::handleMessagesDirs(), Language::hebrewNumeral(), RequestContext::importScopedSession(), Message::inContentLanguage(), User::inDnsBlacklist(), JSTokenizer::init(), FileRepo::initZones(), Wikimedia\Rdbms\Database::insertSelect(), ExternalStore::insertToDefault(), CheckLanguageCLI::isEmpty(), ResourceLoader::isEmptyObject(), Title::isNamespaceProtected(), MediaWiki\Widget\CheckMatrixWidget::isTagChecked(), MediaWiki\Widget\CheckMatrixWidget::isTagDisabled(), MediaWikiTestCase::isUsingExternalStoreDB(), Block::isWhitelistedFromAutoblocks(), SiteStats::jobs(), ReverseArrayIterator::key(), LogPager::limitType(), Linker::link(), SpecialVersion::listAuthors(), ChangeTags::listExplicitlyDefinedTags(), ChangeTags::listSoftwareActivatedTags(), ChangeTags::listSoftwareDefinedTags(), MessageCache::load(), MediaWiki\Interwiki\ClassicInterwikiLookup::load(), ApiAuthManagerHelper::loadAuthenticationRequests(), LocalFile::loadFromCache(), User::loadFromCache(), MediaWiki\Auth\AuthenticationRequest::loadFromSubmission(), Title::loadRestrictions(), Wikimedia\Rdbms\Database::lockForUpdate(), FileJournal::logChangeBatch(), PopulateArchiveRevId::makeDummyRevisionRow(), ResourceLoader::makeModuleResponse(), LogEntryBase::makeParamBlob(), OutputPage::makeResourceLoaderLink(), ApiMain::markParamsSensitive(), ApiMain::markParamsUsed(), EditPage::matchSpamRegex(), EditPage::matchSummarySpamRegex(), MigrateComments::migrate(), MigrateActors::migrate(), ChangeTags::modifyDisplayQuery(), UserArray::newFromIDs(), UserArray::newFromNames(), OutputPageTest::newInstance(), ReverseArrayIterator::next(), Wikimedia\Rdbms\Database::nonNativeInsertSelect(), SiteStats::numberingroup(), Html::openElement(), SiteStats::pagesInNs(), JSMinPlus::parseTree(), ApiResult::path(), ResourceLoaderWikiModule::preloadTitleInfo(), FileBackend::prepare(), SpecialUpload::processVerificationError(), MediaWiki\Preferences\DefaultPreferencesFactory::profilePreferences(), ShellTest::provideMakeScriptCommand(), JobTest::provideTestJobFactory(), FileBackend::publish(), FileBackend::quickDescribe(), TextPassDumper::readDump(), ShortPagesPage::reallyDoQuery(), QueryPage::reallyDoQuery(), LocalisationCache::recache(), ApiFormatXml::recXmlPrint(), ResourceLoader::register(), ApiResult::removeValue(), Wikimedia\Rdbms\Database::replace(), LinkHolderArray::replaceInternal(), LinkHolderArray::replaceInterwiki(), StringUtils::replaceMarkup(), ReverseArrayIterator::rewind(), ApiQueryPrefixSearch::run(), ApiQueryWatchlistRaw::run(), ApiQueryCategories::run(), ApiQueryBacklinks::run(), MemcachedClient::run_command(), TableCleanup::runTable(), SiteStats::salvageInsaneRow(), PrefixSearch::searchWithVariants(), FileBackend::secure(), ApiQueryBase::select(), Wikimedia\Rdbms\Database::selectFieldsOrOptionsAggregate(), Wikimedia\Rdbms\Database::selectOptionsIncludeLocking(), Wikimedia\Rdbms\Database::selectRow(), Wikimedia\Rdbms\Database::selectSQLText(), DatabaseTestHelper::setExistingTables(), EventRelayer::setLogger(), ApiResult::setPreserveKeysList(), ApiResult::setSubelementsList(), MediaWiki\Tests\Revision\RenderedRevisionTest::setUp(), Sanitizer::setupAttributeWhitelist(), OutputPageTest::setupCategoryTests(), LogEventsList::showLogExtract(), LogEventsList::showOptions(), OutputPage::showPermissionsErrorPage(), JSParser::Statement(), FileBackendStore::storeInternal(), ApiResult::stripMetadata(), ApiResult::stripMetadataNonRecursive(), UpdateLogging::sync(), DatabaseTestHelper::tableExists(), Wikimedia\Rdbms\Database::tableNamesWithIndexClauseOrJOIN(), ChangeTags::tagUsageStatistics(), MediaWiki\Tests\Maintenance\DeleteAutoPatrolLogsTest::testFromId(), ResourceLoaderTest::testGetModuleFactory(), WANObjectCacheTest::testGetMultiWithSetCallback(), WANObjectCacheTest::testGetMultiWithUnionSetCallback(), WANObjectCacheTest::testGetWithSetCallback(), TitleTest::testIsValidMoveOperation(), PageArchiveTestBase::testListPagesByPrefix(), PageArchiveTestBase::testListPagesBySearch(), PageArchiveTestBase::testListRevisions(), ExportTest::testPageByTitle(), ApiStructureTest::testParameterConsistency(), PathRouterTest::testParse(), LocalisationCacheTest::testRecacheFallbacksWithHooks(), SpecialSearchTest::testRewriteQueryWithSuggestion(), MediaWiki\Session\SessionBackendTest::testSave(), ImportTest::testSiteInfoContainsNamespaces(), TitleTest::testWgWhitelistReadRegexp(), Linker::titleAttrib(), Linker::tooltipAndAccesskeyAttribs(), HTMLForm::trySubmit(), Wikimedia\Rdbms\Database::unionConditionPermutations(), LocalFile::unprefixRow(), ApiResult::unsetPreserveKeysList(), ApiResult::unsetSubelementsList(), ChangeTags::updateTags(), ReverseArrayIterator::valid(), SwiftFileBackendList::valid(), CliInstaller::validateExtensions(), ApiResult::validateValue(), wfExpandIRI(), wfInstallerMain(), wfMatchesDomainList(), and wfShellExec().

◆ port()

storage can be distributed across multiple and multiple web servers can use the same cache cluster********************* W A R N I N G*********************** Memcached has no security or authentication Please ensure that your server is appropriately and that the port ( )

◆ server()

The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a server ( say  ,
because it has twice the memory of the others and you want to spread usage  evenly 
)

◆ servers()

The wiki should then use memcached to cache various data To use multiple servers ( physically separate boxes or multiple caches on one machine on a large-memory x86  box)

Variable Documentation

◆ $wgDBname

◆ $wgMemCachedServers

$wgMemCachedServers = array( "127.0.0.1:11211" )

Definition at line 64 of file memcached.txt.

Referenced by McTest::execute().

◆ addresses

storage can be distributed across multiple and multiple web servers can use the same cache cluster********************* W A R N I N G*********************** Memcached has no security or authentication Please ensure that your server is appropriately and that the anyone on the internet can put data into and read data from your cache An attacker familiar with MediaWiki internals could use this to steal passwords and email addresses

Definition at line 43 of file memcached.txt.

Referenced by below().

◆ contacted

controlled by the following MediaWiki still creates a BagOStuff but calls it to it are no ops If the cache daemon can t be contacted

Definition at line 78 of file memcached.txt.

◆ Debian

MediaWiki has optional support for a high distributed memory object caching system For general information on but for a larger site with heavy like it should help lighten the load on the database servers by caching data and objects in Debian

Definition at line 10 of file memcached.txt.

◆ distribution

MediaWiki has optional support for a high distributed memory object caching system For general information on but for a larger site with heavy like it should help lighten the load on the database servers by caching data and objects in Ubuntu and probably other Linux distributions If there s no package available for your distribution

Definition at line 10 of file memcached.txt.

◆ firewalled

storage can be distributed across multiple and multiple web servers can use the same cache cluster********************* W A R N I N G*********************** Memcached has no security or authentication Please ensure that your server is appropriately firewalled

Definition at line 33 of file memcached.txt.

◆ it

MediaWiki has optional support for a high distributed memory object caching system For general information on it

Definition at line 1 of file memcached.txt.

◆ kernel

MediaWiki has optional support for a high distributed memory object caching system For general information on but for a larger site with heavy like it should help lighten the load on the database servers by caching data and objects in Ubuntu and probably other Linux distributions If there s no package available for your you can compile it from epoll rt patch for Linux kernel

Definition at line 16 of file memcached.txt.

◆ load

MediaWiki has optional support for a high distributed memory object caching system For general information on but for a larger site with heavy load

◆ memcached

MediaWiki has optional support for memcached

Definition at line 1 of file memcached.txt.

Referenced by mccShowUsage().

◆ memory

MediaWiki has optional support for a high distributed memory object caching system For general information on but for a larger site with heavy like it should help lighten the load on the database servers by caching data and objects in memory
Initial value:
== Installation ==
Packages are available for Fedora
The ContentHandler facility adds support for arbitrary content types on wiki instead of relying on wikitext for everything It was introduced in MediaWiki Each kind of and so on Built in content types are

Definition at line 10 of file memcached.txt.

◆ network

MediaWiki has optional support for a high distributed memory object caching system For general information on but for a larger site with heavy like it should help lighten the load on the database servers by caching data and objects in Ubuntu and probably other Linux distributions If there s no package available for your you can compile it from epoll rt patch for Linux is current Memcached and libevent are under BSD style licenses The server should run on Linux and other Unix like systems you can run multiple servers on one machine or on multiple machines on a network

Definition at line 16 of file memcached.txt.

Referenced by PoolCounterRedis::initAndPopPoolSlotList().

◆ object

controlled by the following MediaWiki still creates a BagOStuff object

Definition at line 78 of file memcached.txt.

◆ performance

MediaWiki has optional support for a high performance

Definition at line 1 of file memcached.txt.

◆ see

MediaWiki has optional support for a high distributed memory object caching system For general information on see

Definition at line 1 of file memcached.txt.

◆ servers

◆ smoothly

controlled by the following MediaWiki still creates a BagOStuff but calls it to it are no ops If the cache daemon can t be it should also disable itself fairly smoothly

Definition at line 93 of file memcached.txt.

◆ source

MediaWiki has optional support for a high distributed memory object caching system For general information on but for a larger site with heavy like it should help lighten the load on the database servers by caching data and objects in Ubuntu and probably other Linux distributions If there s no package available for your you can compile it from source
Initial value:
== Compilation ==
* PHP must be compiled with --enable-sockets
* libevent: http:
(as of 2003-08-11, 0.7a is current)
* optionally
The ContentHandler facility adds support for arbitrary content types on wiki instead of relying on wikitext for everything It was introduced in MediaWiki Each kind of and so on Built in content types as usual *javascript user provided javascript code *json simple implementation for use by etc *css user provided css code *text plain text In PHP
globals txt Globals are evil The original MediaWiki code relied on globals for processing context far too often MediaWiki development since then has been a story of slowly moving context out of global variables and into objects Storing processing context in object member variables allows those objects to be reused in a much more flexible way Consider the elegance of
database rows
Definition: globals.txt:10
Apache License January http
This document provides an overview of the usage of PageUpdater and that is
Definition: pageupdater.txt:3
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
Definition: distributors.txt:9

Definition at line 16 of file memcached.txt.

◆ subarray

The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a subarray

Definition at line 74 of file memcached.txt.

◆ variables

controlled by the following variables

Definition at line 78 of file memcached.txt.

Referenced by CheckLanguageCLI::help(), and CheckExtensionsCLI::help().

◆ vulnerability

storage can be distributed across multiple and multiple web servers can use the same cache cluster********************* W A R N I N G*********************** Memcached has no security or authentication Please ensure that your server is appropriately and that the anyone on the internet can put data into and read data from your cache An attacker familiar with MediaWiki internals could use this to steal passwords and email or to make themselves a sysop and install malicious javascript on the site There may be other types of vulnerability

Definition at line 43 of file memcached.txt.

◆ wikidb

controlled by the following MediaWiki still creates a BagOStuff but calls it to it are no ops If the cache daemon can t be it should also disable itself fairly wikidb

Definition at line 93 of file memcached.txt.

◆ Wikipedia

MediaWiki has optional support for a high distributed memory object caching system For general information on but for a larger site with heavy like Wikipedia

Definition at line 1 of file memcached.txt.

Referenced by PopulateInterwiki::__construct().