Page MenuHomePhabricator

Replace 'refresh' process with Symfony caching
Closed, ResolvedPublic

Description

Currently, we have a /refresh endpoint that is used to cache three pages from on-wiki: MediaWiki:Epub.css, MediaWiki:Wsexport_i18n.ini, and MediaWiki:Wsexport_about. These are fetched from the wikis and cached in files. This caching can now be replaced by standard Symfony caching, which will mean less code and that this data will be able to be cleared along with the rest of the cache with ./bin/console c:p:c app.cache.

The refresh process used to be used to cache the namespace lists, but that was changed in T265660.

The MediaWiki:Wsexport_i18n.ini data will not be required after T264699 is resolved.

Caching each of these for 1 month seems reasonable.

The /refresh endpoint should be updated to delete the relevant cache items (after which they'll be updated when next required by an export).

Event Timeline

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

When caching is enabled, I see that the MediaWiki:Wsexport_about page (e.g. https://en.wikisource.org/wiki/MediaWiki:Wsexport_about) is cached on the filesystem.

It can be cleared by going to /refresh in the browser (e.g. https://wsexport-test.wmflabs.org/refresh).

I don't think this will affect production yet, as caching is not yet enabled.

Test environment: docker commit fe950654ff8c9b7d2351a5ad2ccd40cd4ebac315.

ifried subscribed.

This has now been deployed, so I'm marking it as Done.