wiki.techinc.nl/includes
Dan Duvall d83a7bcd09 Cache loading of SettingsBuilder sources
The `SettingsBuilder` now accepts a PSR-16 cache interface with which to
store and query settings before attempting to load from each source. By
default, no cache is used, but any object that implements the
`Psr\SimpleCache\CacheInterface` may be provided to the constructor.

An explicit dependency on "psr/simple-cache" has been added to
`composer.json`. Note that this dependency already existed in vendor
albeit it as a transitive one.

An APCu based `SharedMemoryCache` adapter is provided as a canonical
PSR-16 compliant interface for production use.

Sources are now queued by the `SettingsBuilder` when calling `load()`.
If a cache interface has been provided, and the source is considered
cacheable (implements `CacheableSource`), then it is wrapped as a
`CachedSource` which will query the cache first before loading from the
wrapped source.

Cache stampedes are mitigated using probabilistic early expiry. The
implementation for this was partially based on symfony/cache-contract
source code but also from the Wikipedia article and paper referenced
therein.

See https://en.wikipedia.org/wiki/Cache_stampede#Probabilistic_early_expiration

Bug: T294748
Change-Id: I52ab3899731546876ee58265bd4a1927886746dc
2021-11-29 12:54:59 -08:00
..
actions Remove or replace usages of "sane" 2021-11-22 13:35:17 +00:00
api Localisation updates from https://translatewiki.net. 2021-11-29 07:55:55 +01:00
auth Use correct default value when calling Status::getWikiText 2021-10-16 22:35:01 +02:00
block Remove or replace usages of "sanity" 2021-11-19 23:19:42 +00:00
cache Remove or replace usages of "sane" 2021-11-22 13:35:17 +00:00
changes Fix missing history-deleted class for suppressed revision on changeslist 2021-11-27 23:49:12 +01:00
changetags ChangeTags: Set interface flag when parsing tag names 2021-09-27 16:10:44 +02:00
collation collation: Improve IcuCollation for static code analyzer 2021-11-08 23:11:19 +01:00
CommentFormatter Remove or replace usages of "sane" 2021-11-22 15:48:03 +00:00
composer Update Legoktm's email address 2021-05-02 05:39:37 +00:00
config Introduce includes/Storage/PageUpdaterFactory 2021-07-19 12:15:26 +02:00
content Merge "Hard-deprecate Content::prepareSave." 2021-11-23 11:20:21 +00:00
context Remove or replace usages of "sane" 2021-11-22 13:35:17 +00:00
dao build: Updating dependencies 2021-07-22 03:36:05 +00:00
db rdbms: Stop calling LBFactory::setAgentName from MW wiring 2021-11-19 00:51:41 +00:00
debug Remove or replace usages of "sane" 2021-11-22 13:35:17 +00:00
deferred Remove or replace usages of "sane" 2021-11-22 13:35:17 +00:00
diff Merge "Use LinkRenderer instead of building link HTML manually" 2021-11-27 08:28:50 +00:00
edit
editpage editpage: Replace usage of Title in TextboxBuilder::class 2021-09-20 10:24:00 +01:00
exception Remove or replace usages of "sane" 2021-11-22 13:35:17 +00:00
export Don't throw away '0' edit summary 2021-11-24 10:33:36 +00:00
externalstore Merge "ExternalStoreDB::getMaster: Hard deprecate now it's unused in prod" 2021-09-08 20:52:48 +00:00
filebackend LockManager: distinguish conflicts from other kinds of lock errors 2021-11-09 21:58:20 +00:00
filerepo Revert "Remove last User dependencies from File" 2021-11-26 17:06:36 +00:00
gallery Fix height of traditional galleries in new media dom 2021-10-08 17:57:44 +00:00
historyblob HistoryBlobStub: add getLocation() to get $mOldId 2021-10-19 18:23:30 +00:00
Hook Rename variables to disambiguate OutputPageParserOutput hook 2021-11-23 15:50:01 -05:00
HookContainer Rename variables to disambiguate OutputPageParserOutput hook 2021-11-23 15:50:01 -05:00
htmlform Remove or replace usages of "sane" 2021-11-22 13:35:17 +00:00
http Merge "Support $wgLocalHTTPProxy in MultiHttpClient" 2021-11-22 21:36:42 +00:00
import Merge "import/export: Add documentation for nullable arguments" 2021-10-20 18:47:28 +00:00
installer Localisation updates from https://translatewiki.net. 2021-11-29 07:55:55 +01:00
interwiki Use getWithSetCallback() instead of get() + set() 2021-11-18 18:58:13 +00:00
jobqueue Remove or replace usages of "sanity" 2021-11-19 23:19:42 +00:00
json FormatJson: Optimize encode() for supported PHP versions 2021-08-20 08:03:11 -04:00
language Remove or replace usages of "sane" 2021-11-22 15:48:03 +00:00
languages Add Makhuwa (vmw) to Names.php 2021-11-29 09:34:09 +02:00
libs Merge "rdbms: Add DB host to TransactionProfiler logging and fix time fields" 2021-11-29 16:33:07 +00:00
linkeddata
linker Add comment flag to LinkRenderer 2021-11-02 13:03:20 +01:00
logging Remove or replace usages of "sane" 2021-11-22 13:35:17 +00:00
mail EmailNotification: fix misplaced tab 2021-09-20 22:25:20 +00:00
media Remove or replace usages of "sane" 2021-11-22 13:35:17 +00:00
Message Add Message/MessageValue user group member parameter type 2021-11-16 11:24:35 -05:00
Navigation Use Message::page instead of Message::title 2021-06-09 13:18:22 +00:00
objectcache objectcache: Change variable name from master to primary 2021-10-14 19:40:01 +00:00
page Merge "Use UndeletePage from Special:Undelete" 2021-11-29 17:54:12 +00:00
pager AllMessagesTablePager: Avoid double class mw-datatable 2021-10-09 16:59:10 +00:00
ParamValidator/TypeDef UserDef: creating from id 0 should be unknown user, not context ip 2021-09-14 03:25:40 +00:00
parser Hard-deprecate ParserOutput::hasDynamicContent() 2021-11-23 15:40:46 -05:00
password Remove PasswordCannotMatchUsername password policy 2021-09-06 14:55:12 +00:00
Permissions permissions: Avoid null as init for PermissionManager->usersRights cache 2021-09-22 22:28:32 +02:00
poolcounter Remove or replace usages of "sane" 2021-11-22 13:35:17 +00:00
preferences Add new ParserOutput::{get,set}OutputFlag() interface 2021-10-15 14:25:54 -04:00
profiler profiler: Remove dependency on WebRequest from Profiler 2021-10-09 03:00:45 +00:00
rcfeed Drop User methods which were deprecated since 1.35 2021-11-12 15:35:50 +02:00
registration Merge "registration: Let namespaces specify if they're includable" 2021-11-16 00:11:13 +00:00
resourceloader Remove or replace usages of "sanity" 2021-11-19 23:19:42 +00:00
Rest Remove or replace usages of "sanity" 2021-11-19 23:19:42 +00:00
Revision Revert "Remove last User dependencies from File" 2021-11-26 17:06:36 +00:00
revisiondelete Don't throw away '0' edit summary 2021-11-24 10:33:36 +00:00
revisionlist build: Updating dependencies 2021-07-22 03:36:05 +00:00
search Remove or replace usages of "sane" 2021-11-22 13:35:17 +00:00
session Remove or replace usages of "sane" 2021-11-22 13:35:17 +00:00
Settings Cache loading of SettingsBuilder sources 2021-11-29 12:54:59 -08:00
shell ShellboxClientFactory: add RPCClient getters 2021-11-05 16:41:22 +00:00
site Use getWithSetCallback() instead of get() + set() 2021-11-18 18:58:13 +00:00
skins Remove or replace usages of "sanity" 2021-11-19 23:19:42 +00:00
sparql sparql: Replace deprecated Http::userAgent() in SparqlClient 2021-08-04 13:54:13 +00:00
specialpage Use UndeletePage from Special:Undelete 2021-11-24 19:25:06 +01:00
specials Merge "Use UndeletePage from Special:Undelete" 2021-11-29 17:54:12 +00:00
Storage Remove or replace usages of "sanity" 2021-11-19 23:19:42 +00:00
templates Don't use classes error, success and warning outside parser 2021-04-27 17:11:14 +02:00
tidy Using @return never documentation on always-throw-function 2021-09-07 17:29:03 +02:00
title Remove or replace usages of "sanity" 2021-11-19 23:19:42 +00:00
upload Remove or replace usages of "sane" 2021-11-22 13:35:17 +00:00
user Revert "Remove last User dependencies from File" 2021-11-26 17:06:36 +00:00
utils resourceloader: Decouple FileContentsHasher from MW ObjectCache 2021-11-19 17:04:06 +00:00
watcheditem Change WatchedItemStore to cache an array instead of MapCacheLRU 2021-10-18 13:00:03 -07:00
watchlist build: Updating dependencies 2021-07-22 03:36:05 +00:00
widget Remove unreachable code after exception/die/exit 2021-09-03 23:14:28 +00:00
xml Simplify else-branches after continue/break 2021-08-17 22:51:43 +02:00
.htaccess
ActorMigration.php Schema migration for revison_actor_temp table removal 2021-07-14 08:29:04 +10:00
ActorMigrationBase.php Schema migration for revison_actor_temp table removal 2021-07-14 08:29:04 +10:00
AjaxDispatcher.php ILoadBalancer/ILBFactory: Rename commitMasterChanges() to commitPrimaryChanges() 2021-09-02 11:27:10 -07:00
AjaxResponse.php
AutoLoader.php Merge "AutoLoader: Use ?? instead of multiple if-isset-else branches" 2021-08-12 02:05:25 +00:00
BadFileLookup.php Use getWithSetCallback() instead of get() + set() 2021-11-18 18:58:13 +00:00
CategoriesRdf.php
Category.php Remove Title from signatures in CategoryViewer 2021-09-13 16:14:06 +00:00
CategoryViewer.php Remove or replace usages of "sane" 2021-11-22 15:48:03 +00:00
CommentStore.php Fix various typos in documentation 2021-08-23 09:03:44 +00:00
CommentStoreComment.php
ConfiguredReadOnlyMode.php
ContentSecurityPolicy.php Remove or replace usages of "sane" 2021-11-22 15:48:03 +00:00
DefaultSettings.php Remove or replace usages of "sane" 2021-11-22 13:35:17 +00:00
Defines.php objectcache: make CACHE_MEMCACHED alias "memcached-php" 2021-11-10 18:55:47 +00:00
DeprecatedGlobal.php StubObject: add magic __get() and __set() 2021-09-04 05:37:25 +00:00
DerivativeRequest.php build: Update mediawiki/mediawiki-phan-config to 0.11.0 2021-09-07 17:19:05 +02:00
DevelopmentSettings.php Set $wgIncludejQueryMigrate to false as default 2021-08-29 02:09:35 +02:00
DummyLinker.php Introduce CommentFormatter 2021-09-28 11:13:03 -07:00
EditPage.php Don't throw away '0' edit summary 2021-11-24 10:33:36 +00:00
Emptiable.php
EventRelayerGroup.php
ExtensionInfo.php
FauxRequest.php Remove backward compatibility $_FILES from FauxRequest::getUpload 2021-05-16 18:27:35 +00:00
FauxRequestUpload.php Create FauxRequestUpload to fake uploads in tests 2021-04-06 23:10:43 +02:00
FauxResponse.php
FeedUtils.php Introduce CommentFormatter 2021-09-28 11:13:03 -07:00
FileDeleteForm.php Use DeletePage in FileDeleteForm and fix output of ApiDelete 2021-11-18 01:41:51 +01:00
ForeignResourceManager.php
ForkController.php Unbreak ForkController 2021-07-14 14:08:22 +02:00
FormOptions.php
GitInfo.php
GlobalFunctions.php Remove or replace usages of "sanity" 2021-11-19 23:19:42 +00:00
HeaderCallback.php
Hooks.php Mark Hooks::runner() as @internal 2021-07-28 23:49:27 +00:00
Html.php Html::openElement() micro-optimisations 2021-08-02 18:10:59 +00:00
Linker.php Remove or replace usages of "sanity" 2021-11-19 23:19:42 +00:00
LinkFilter.php
ListToggle.php
MagicWord.php
MagicWordArray.php docs: Fix nullable documentation for class properties 2021-09-24 00:54:53 +00:00
MagicWordFactory.php build: Updating dependencies 2021-07-22 03:36:05 +00:00
MediaWiki.php Merge "rdbms: Stop calling LBFactory::setAgentName from MW wiring" 2021-11-22 15:05:58 +00:00
MediaWikiServices.php Merge "Make ArchivedRevisionLookup a service" 2021-10-20 18:51:32 +00:00
MediaWikiVersionFetcher.php
MergeHistory.php Remove or replace usages of "sanity" 2021-11-19 23:19:42 +00:00
MovePage.php Remove or replace usages of "sanity" 2021-11-19 23:19:42 +00:00
MWGrants.php Reapply "GrantsInfo service to replace MWGrants" 2021-09-18 08:52:22 +00:00
MWNamespace.php Hard-deprecate remaining MWNamespace methods 2021-10-20 21:16:25 +02:00
MWTimestamp.php Split TimeCorrection parser into separate class 2021-05-07 10:43:09 -07:00
NoLocalSettings.php NoLocalSettings: Pass an EmptyBagOStuff to TemplateParser 2021-11-03 17:23:26 +00:00
OrderedStreamingForkController.php
OutputHandler.php Remove or replace usages of "sanity" 2021-11-19 23:19:42 +00:00
OutputPage.php Merge "Replace deprecated methods IContextSource::getWikiPage && IContextSource::canUseWikiPage" 2021-11-19 15:09:58 +00:00
PageProps.php Soft deprecate PageProps::getInstance() 2021-09-26 00:22:26 +00:00
PathRouter.php
PHPVersionCheck.php Tweak error message for missing composer dependencies 2021-11-17 09:53:57 -08:00
Pingback.php build: Updating dependencies 2021-07-22 03:36:05 +00:00
ProtectionForm.php Revert "Use CsrfTokenSet as CSRF token source" 2021-08-05 15:48:26 -07:00
ProxyLookup.php
RawMessage.php
ReadOnlyMode.php
ServiceWiring.php Add comment flag to LinkRenderer 2021-11-02 13:03:20 +01:00
Setup.php Merge "Introduce setting PHP_INI env configs via a settings source" 2021-11-25 21:47:33 +00:00
SiteConfiguration.php Use array_fill_keys() instead of array_flip() if that reflects the developer's intention 2021-06-15 00:11:10 +00:00
SiteStats.php SiteStats: Replace usages of "sane" 2021-11-22 13:38:40 +00:00
SiteStatsInit.php Same code style and formatting for exists-style SQL queries 2021-08-12 11:37:58 +02:00
Status.php build: Updating dependencies 2021-07-22 03:36:05 +00:00
StreamFile.php Remove or replace usages of "sanity" 2021-11-19 23:19:42 +00:00
StubGlobalUser.php Emit deprecation warnings reading from $wgUser 2021-09-15 20:17:04 -07:00
StubObject.php StubObject: add magic __get() and __set() 2021-09-04 05:37:25 +00:00
StubUserLang.php Remove StubUserLang::findVariantLink 2021-05-15 12:51:26 -07:00
TemplateParser.php TemplateParser: Remove support for deprecated cache-disabling parameter 2021-09-17 19:48:54 +00:00
TemplatesOnThisPageFormatter.php
Title.php Merge "PageStore: avoid getPageById, since it bypasses caching." 2021-11-23 15:41:32 +00:00
TitleArray.php docs: Declare UserArray/TitleArray as Iterator<User>/Iterator<Title> 2021-08-30 22:37:54 +02:00
TitleArrayFromResult.php docs: Declare UserArray/TitleArray as Iterator<User>/Iterator<Title> 2021-08-30 22:37:54 +02:00
TitleFactory.php build: Updating dependencies 2021-07-22 03:36:05 +00:00
TrackingCategories.php Register omitted tracking categories 2021-10-16 12:14:47 +00:00
WebRequest.php Remove or replace usages of "sane" 2021-11-22 13:35:17 +00:00
WebRequestUpload.php Create FauxRequestUpload to fake uploads in tests 2021-04-06 23:10:43 +02:00
WebResponse.php
WebStart.php Using @return never documentation on always-throw-function 2021-09-07 17:29:03 +02:00
WikiMap.php Remove or replace usages of "sanity" 2021-11-19 23:19:42 +00:00
WikiReference.php Remove or replace usages of "sane" 2021-11-22 13:35:17 +00:00