aboutsummaryrefslogtreecommitdiffstats
path: root/includes/diff
diff options
context:
space:
mode:
authorDerick Alangi <alangiderick@gmail.com>2023-09-07 16:12:17 +0100
committerDerick Alangi <alangiderick@gmail.com>2024-03-19 12:38:39 +0300
commitd372626b97e83ec1f82b88e75fbaadf99ad2f89b (patch)
treeeed4c9df0653d4a6d4d08792dcfcbb2a2cad08f6 /includes/diff
parent39af55050450d08fb51a0a358a24bd204a21d7e1 (diff)
downloadmediawikicore-d372626b97e83ec1f82b88e75fbaadf99ad2f89b.tar.gz
mediawikicore-d372626b97e83ec1f82b88e75fbaadf99ad2f89b.zip
objectcache: Introduce `ObjectCacheFactory` MW service
ObjectCache is already doing a lot of factory pattern logic like creating instances of the various BagOStuff, this should really be the responsibility of the factory servicet. This patch introduces a proper factory (ObjectCacheFactory) to handle the responsibility of creating various instances of BagOStuff. Since `newFromParams()` is a static function that gets passed in configuration of $wgObjectCaches, that can stay that way (to keep supporting how we do this in prod today). Technical Breaking Change: `ObjectCache::makeLocalServerCache()` now has a parameter and requires it but there are no callers of this method outside MW core hence it is safe to change (and this patch update all callers) to work correctly. Cache prefix is gotten from global state because sometimes at this stage, the services container is not available. Bug: T358346 Change-Id: I3179a387486377c6a575d173f39f82870c49c321
Diffstat (limited to 'includes/diff')
0 files changed, 0 insertions, 0 deletions