Page MenuHomePhabricator

Complete documentation about different types of caching for extension developers
Open, Needs TriagePublic



As an extension developer, I often ran into issues where my code would not be executed / updated due to some cache hit in earlier parts of the code. Documentation is spread out all over MediaWiki, and incomplete.

Who would benefit

Extension developers who write code that dynamically changes page content and need to know when and how to invalidate the caches.

Proposed solution

A good starting point is We need to complete the information missing for some cache types. A rough description of which caches are used when in the execution order would be extremely helpful (maybe in relation to some central hooks). Also, some information of how these caches can be invalidated within the code and in general should be added.

Event Timeline

Mglaser created this task.Jan 30 2017, 10:48 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 30 2017, 10:48 PM
Restricted Application added a project: Documentation. · View Herald TranscriptJan 31 2017, 11:26 AM

This project is selected for the Developer-Wishlist voting round and will be added to a MediaWiki page very soon. To the subscribers, or proposer of this task: please help modify the task description: add a brief summary (10-12 lines) of the problem that this proposal raises, topics discussed in the comments, and a proposed solution (if there is any yet). Remember to add a header with a title "Description," to your content. Please do so before February 5th, 12:00 pm UTC.

Thanks @Mglaser for bringing this up. is actually a fairly recently addition to in its current form. I wrote it last year following a major refactoring and subsequent simplification of object cache entry points.

For the most part, our cache interfaces have been reduced to only three (local, cluster, and main). The actual number of caching layers as used logically by the application for different purposes is much greater and requires more documentation indeed. The manual page lists a few, but is far from complete.

See also:

Meno25 removed a subscriber: Meno25.Nov 23 2018, 7:34 AM