|This page describes the feature as originally planned. It may not exactly match the existing implementation. See T277203.|
Derived slots are an an addition to MCR that allows information that is derived from the content of a page (or more precisely, from the content of the slots of a revision) to be stored alongside that content (as part of the same revision), even if the derived content is generated asynchronously or updated later on.
Derived slots work much like regular slots, with a few important differences:
- their size is not included in the revision size, and their hash does not contribute to the revision's hash.
- they can be updated at any time, using a new
updateRevision()method that lives alongside
- updating a derived slot is a destructive operation, the previous content of that slot (on the same revision) is lost.
- updating derived slots is transparent for users. No entry is generated in the revision history or in RecentChanges or on the watchlist. The update is a purely technical operation, not an event from the perspective of the user.
- If a derived slot is updated for the current revision of a page, this would however cause the page to be re-rendered (perhaps we want to make this optional), and derived page data (such as entries in the links tables) to be regenerated, similar to the way pages get rerendered when a template changes.
- Derived slots should not show in diff views, at least not per default. The purpose of a diff view is to show what a user changed.