Page MenuHomePhabricator

ForeignApiRepo should be configurable as to how long it caches api responses
Closed, ResolvedPublic

Description

Currently ForeginApiRepo is hardcoded to cache HTTP responses for at most 1 hour (And siteinfo for 2) [ With adaptive ttl that may be less].

Re-fetching this data is really expensive. 1 hour is probably insufficient for many users. This should at the very least be configurable.

For clarity i'm referring to third argument of ForeignApiRepo::httpGetCached

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Additionally, siteinfo is only cached for 2 hours, and that's something that changes basically never. I think we should default to 1 week for that.

Change 731257 had a related patch set uploaded (by Brian Wolff; author: Brian Wolff):

[mediawiki/core@master] Change default ForeignAPIRepo metadata cache to 4 hours and allow override

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

Change 731257 merged by jenkins-bot:

[mediawiki/core@master] filerepo: Increase ttl for foreign metadata to 4h and make configurable

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

TheDJ assigned this task to Bawolff.
TheDJ subscribed.

Sounds like its fixed now. Pls reopen if i misinterpreted.