Page MenuHomePhabricator

Deprecate and remove $wgObjectCaches[hash]
Open, MediumPublic

Description

See https://gerrit.wikimedia.org/r/294959.

@Krinkle wrote in June 2016:

Is this actually used? [..] Seems there is only 1 use, in AbuseFilter.

Instead of using HashBagOStuff as a central singleton, individual users of it should use their own instance and pass it down where needed. The class requires no parameters or injected fields, so usage should be pretty simple.

For the specific use case of process-caching things from memcaced, WANObjectCache introduced a built-in pcTTL option that should be used instead.

One the problems with the central singleton is that it can grow out of control, and there's no easy way to determine what its maxKeys should be given that usage is unknown.

Event Timeline

Krinkle created this task.Jul 1 2016, 11:11 PM
Restricted Application added a subscriber: Zppix. · View Herald TranscriptJul 1 2016, 11:11 PM
Krinkle updated the task description. (Show Details)Feb 7 2018, 1:33 AM
Krinkle renamed this task from Deprecate $wgObjectCaches[hash] to Deprecate and remove $wgObjectCaches[hash].May 29 2019, 3:25 PM

Change 530829 had a related patch set uploaded (by simetrical; owner: simetrical):
[mediawiki/core@master] BadFileLookup to replace wfIsBadImage

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

Change 530829 merged by jenkins-bot:
[mediawiki/core@master] BadFileLookup to replace wfIsBadImage

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