MediaWiki REL1_33
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 of a server (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 on a network
 
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"  ,
 
)

References memcached, and of.

Referenced by MemcachedClient::__construct(), ReverseArrayIterator::__construct(), MagicWord::__construct(), Message::__construct(), ResourceLoaderImage::__construct(), ResourceLoaderFileModule::__construct(), FSFileBackend::__construct(), IndexPager::__construct(), BatchRowIterator::__construct(), MediaWikiTitleCodec::__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::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(), PHPVersionCheck::checkExtensionExistence(), LocalRepo::checkRedirect(), ApiBase::checkTitleUserPermissions(), ApiBase::checkUserRightsAny(), CleanupUsersWithNoId::cleanup(), MapCacheLRU::clear(), ResourceLoaderFileModule::collateFilePathListByOption(), UpdateLogging::copyExactMatch(), MediaWikiTestCase::copyTestData(), ReverseArrayIterator::count(), MediaWiki\Logger\LogCapturingSpi::createLogger(), User::createNew(), ReverseArrayIterator::current(), CommentStore::decodeMessage(), ExternalStore::defaultStoresAreReadOnly(), StringUtils::delimiterReplace(), deprecationHelperGetPropertyOwner(), MemcachedClient::disconnect_all(), RecompressTracked::dispatchToReplica(), FSFileBackend::doCopyInternal(), SwiftFileBackend::doCopyInternal(), FSFileBackend::doCreateInternal(), SwiftFileBackend::doCreateInternal(), FSFileBackend::doDeleteInternal(), SwiftFileBackend::doDeleteInternal(), SwiftFileBackend::doDescribeInternal(), DBFileJournal::doGetChangeEntries(), FSFileBackend::doMoveInternal(), SwiftFileBackend::doMoveInternal(), GenderCache::doQuery(), UserrightsPage::doSaveUserGroups(), FSFileBackend::doStoreInternal(), SwiftFileBackend::doStoreInternal(), ApiUserrightsTest::doSuccessfulRightsChange(), FileBackendTest::doTestGetFileContents(), FileBackendTest::doTestGetLocalCopy(), FileBackendTest::doTestGetLocalReference(), TextPassDumper::endElement(), Sanitizer::escapeId(), ApiBlock::execute(), ApiComparePages::execute(), ApiFeedWatchlist::execute(), ApiParse::execute(), ApiProtect::execute(), ApiQueryAllMessages::execute(), ApiQueryBlocks::execute(), ApiQueryIWLinks::execute(), ApiQueryLangLinks::execute(), ApiQueryUsers::execute(), ApiUserrights::execute(), CleanupRemovedModules::execute(), PurgeModuleDeps::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(), HTMLForm::getButtons(), OOUIHTMLForm::getButtons(), VFormHTMLForm::getButtons(), ApiQueryInfo::getCacheMode(), ApiQueryUsers::getCacheMode(), CommentStore::getCommentInternal(), SiteConfiguration::getConfig(), Wikimedia\Rdbms\LoadBalancer::getConnection(), File::getDescriptionText(), ForeignDBFile::getDescriptionText(), MediaWikiTestCase::getExternalStoreDatabaseConnections(), FileContentsHasher::getFileContentsHash(), ResourceLoaderModule::getFileDependencies(), MediaWiki\Preferences\DefaultPreferencesFactory::getForm(), Language::getGenderNsText(), MWGrants::getGrantRights(), OutputPage::getHeadLinksArray(), TablePager::getHiddenFields(), TestUserRegistry::getImmutableTestUser(), SpecialUpload::getInitialPageText(), HTMLAutoCompleteSelectField::getInputHTML(), HTMLCheckMatrix::getInputHTML(), HTMLFormFieldCloner::getInputHTML(), HTMLFormFieldCloner::getInputOOUI(), ActorMigration::getInsertValuesWithTempTable(), MediaWiki\Revision\RevisionStore::getKnownCurrentRevision(), ResourceLoaderClientHtml::getLoad(), MediaWiki\Tests\Revision\RevisionStoreDbTestBase::getLoadBalancerMock(), ApiParamInfo::getModuleInfo(), WANObjectCache::getMulti(), TestUserRegistry::getMutableTestUser(), Language::getNamespaceAliases(), ParserOutput::getOutputHooks(), ApiBase::getParameterFromSettings(), PHPVersionCheck::getPHPInfo(), FormatMetadata::getPriorityLanguages(), MediaWiki\Revision\RevisionRenderer::getRenderedRevision(), MWNamespace::getRestrictionLevels(), ApiResult::getResultData(), ExternalStoreDB::getSlave(), ConverterRule::getTextInBidtable(), Message::getTitle(), ConvertExtensionToRegistration::handleMessagesDirs(), Language::hebrewNumeral(), RequestContext::importScopedSession(), Message::inContentLanguage(), User::inDnsBlacklist(), JSTokenizer::init(), FileRepo::initZones(), Wikimedia\Rdbms\Database::insertSelect(), ExternalStore::insertToDefault(), 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(), PopulateArchiveRevId::makeDummyRevisionRow(), LogEntryBase::makeParamBlob(), OutputPage::makeResourceLoaderLink(), ChangeTags::makeTagSummarySubquery(), 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(), SpecialUpload::processVerificationError(), MediaWiki\Preferences\DefaultPreferencesFactory::profilePreferences(), ShellTest::provideMakeScriptCommand(), JobTest::provideTestJobFactory(), TextPassDumper::readDump(), QueryPage::reallyDoQuery(), ShortPagesPage::reallyDoQuery(), LocalisationCache::recache(), ApiFormatXml::recXmlPrint(), ResourceLoader::register(), ApiResult::removeValue(), Wikimedia\Rdbms\Database::replace(), LinkHolderArray::replaceInternal(), LinkHolderArray::replaceInterwiki(), StringUtils::replaceMarkup(), ReverseArrayIterator::rewind(), ApiQueryBacklinks::run(), ApiQueryCategories::run(), ApiQueryPrefixSearch::run(), ApiQueryWatchlistRaw::run(), MemcachedClient::run_command(), TableCleanup::runTable(), SiteStats::salvageInsaneRow(), ApiQueryBase::select(), DatabaseTestHelper::setExistingTables(), ApiResult::setPreserveKeysList(), ApiResult::setSubelementsList(), MediaWiki\Tests\Revision\RenderedRevisionTest::setUp(), Sanitizer::setupAttributeWhitelist(), LogEventsList::showLogExtract(), LogEventsList::showOptions(), OutputPage::showPermissionsErrorPage(), JSParser::Statement(), ApiResult::stripMetadata(), ApiResult::stripMetadataNonRecursive(), UpdateLogging::sync(), DatabaseTestHelper::tableExists(), Wikimedia\Rdbms\Database::tableNamesWithIndexClauseOrJOIN(), MediaWiki\Tests\Maintenance\DeleteAutoPatrolLogsTest::testFromId(), ResourceLoaderTest::testGetModuleFactory(), WANObjectCacheTest::testGetMultiWithSetCallback(), WANObjectCacheTest::testGetMultiWithUnionSetCallback(), WANObjectCacheTest::testGetWithSetCallback(), WANObjectCacheTest::testGetWithSetcallback_touched(), 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(), Wikimedia\Rdbms\Database::unionConditionPermutations(), LocalFile::unprefixRow(), ApiResult::unsetPreserveKeysList(), ApiResult::unsetSubelementsList(), ChangeTags::updateTags(), Wikimedia\Rdbms\Database::upsert(), ReverseArrayIterator::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.

◆ 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 91 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 12 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 14 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 38 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 3 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 23 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

Definition at line 6 of file memcached.txt.

Referenced by User::addGroup(), User::addToDatabase(), User::checkAndSetTouched(), User::confirmationToken(), SpecialSearch::execute(), LoginSignupSpecialPage::execute(), LocalFile::exists(), MediaWiki\Interwiki\ClassicInterwikiLookup::fetch(), User::getActorId(), MessageCache::getAllMessageKeys(), OldLocalFile::getArchiveName(), LocalFile::getBitDepth(), User::getBlockedStatus(), User::getDBTouched(), LocalFile::getDescription(), User::getEmail(), User::getEmailAuthenticationTimestamp(), User::getFormerGroups(), User::getGroupMemberships(), User::getGroups(), LocalFile::getHeight(), User::getId(), LocalFile::getMediaType(), LocalFile::getMetadata(), LocalFile::getMimeType(), MessageCache::getMsgFromNamespace(), User::getName(), User::getNewtalk(), User::getRealName(), User::getRegistration(), LocalFile::getSha1(), LocalFile::getSize(), LocalFile::getTimestamp(), User::getToken(), User::getTouched(), LocalFile::getUser(), OldLocalFile::getVisibility(), LocalFile::getWidth(), User::invalidateEmail(), LocalFile::isCacheable(), OldLocalFile::isDeleted(), User::isEmailConfirmed(), MessageCache::loadFromDB(), User::loadOptions(), MessageCache::refreshAndReplaceInternal(), User::removeGroup(), User::resetOptions(), User::saveSettings(), User::setCookies(), User::setEmail(), User::setEmailAuthenticationTimestamp(), User::setName(), User::setNewtalk(), User::setRealName(), User::setToken(), User::spreadBlock(), and OldLocalFile::userCan().

◆ memcached

MediaWiki has optional support for memcached

Definition at line 1 of file memcached.txt.

Referenced by array(), and 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 8 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 33 of file memcached.txt.

Referenced by PoolCounterRedis::initAndPopPoolSlotList().

◆ object

controlled by the following MediaWiki still creates a BagOStuff object

Definition at line 90 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 3 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 91 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
Apache License January http
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
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
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
This document provides an overview of the usage of PageUpdater and that is

Definition at line 14 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 71 of file memcached.txt.

◆ variables

controlled by the following variables

Definition at line 84 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 45 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 136 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 6 of file memcached.txt.

Referenced by PopulateInterwiki::__construct().