Page MenuHomePhabricator

Create objectcache/BagOStuff library
Open, LowestPublic

Description

Dependencies:

BagOStuff

MultiWriteBagOStuff

ReplicatedBagOStuff

WANObjectCache

  • EventRelayer

This should wait on T236412 to happen first.

Event Timeline

Legoktm added a subscriber: aaron.

@aaron, do you think we're ready to start doing this? How do we want to handle the ObjectFactory dependency?

How do we want to handle the ObjectFactory dependency?

The easiest way would probably be to move ObjectFactory to a tiny library.

Krinkle moved this task from General to libs/objectcache on the MediaWiki-libs-BagOStuff board.

This would be great and would allow libraries such as https://github.com/addshore/psr-6-mediawiki-bagostuff-adapter to pull in the caching library for use during tests, rather than just missing the requirement entirely (as the only thing to require right now would be the whole of core)

We could move forward with this just excluding RESTBagOStuff for now

Removing the T110022 sub-task because creation a the library isn't blocked on having our HTTP abstraction published. Nothing in the relevant interfaces and utilities here uses HTTP functions. There's merely one BagOStuff implementation that MediaWiki has (RESTBagOStuff) that uses HTTP, which doesn't need to be in the library (and for many years, wasn't in core, either).

It's perfectly alright to leave that out of the initial publication library. Regardless of if and when we add it to the library, consumers of the library can and should be able at all times to make their own implementations and sub classes on top the library. This would effectively be an example of that within MediaWiki. (We did the same with includes/db/Oracle, which still remains to this date a MW-only implementation.)

So is anything other than EventRelayer blocking this?

Nope. What do you want to call it? ObjectCache or BagOStuff?

Change 490963 had a related patch set uploaded (by Aaron Schulz; owner: Aaron Schulz):
[mediawiki/core@master] objectcache: remove EventRelayer dependency from WANObjectCache

https://gerrit.wikimedia.org/r/490963

Nope. What do you want to call it? ObjectCache or BagOStuff?

ObjectCache

tstarling subscribed.

Would you move the classes to a namespace? If so, would the b/c aliases be part of the library?

Yes, the classes would be namespaced. The b/c aliases would go in core's includes/compat/.

aaron lowered the priority of this task from Low to Lowest.Oct 5 2022, 6:31 PM