Currently, code that needs to purge or update data derived from page content (during purge, import, undeletion, etc) does so by calling WikiPage::doEditUpdates and/or by running the DataUpdates returned by Content::getSecondaryLinksUpdate directly.
For MCR, calls to Content::getSecondaryLinksUpdate() need to be replaced, since there may be more than one slot (and thus more than one Content object), and callers should not need to know about slots. This also means that calls to ontent::getSecondaryDataUpdates should not be replaced directly with calls to the new ContentHandler::getSecondaryDataUpdates proposed in T194038. Callers should not have to know about individual slots.
Instead, WikiPage::doSecondaryDataUpdates() should be introduced, with an interface similar to WikiPage::doEditUpdates(), which would use a DerivedPageDataUpdater run the combined DataUpdates for all slots.
Note: this task used to call for calls to WikiPage::doEditUpdates(), but there currently is no replacement for this without exposing DerivedPageDataUpdater directly, which we want to avoid. So WikiPage::doEditUpdates() should be un-deprecated, and its signature changed to accept RevisionRecords as well as old style Revision objects.
Considerations for future refactoring:
In the context of the new page update interface for MCR, a new concise interface should be exposed for purging or updating caches and other derived data. This should be a stateless service, exposing the following methods:
However, in order to run the DataUpdates, the Content of Revision needs to be rendered, and the rendering needs to be cached.
Doing that with a stateless services is blocked on having a RenderdRevisionCache, which is blocked on having RenderedRevision, which is blocked on having a RevisionRenderer, which is blocked on SlotRoleHandler.
As an intermediate step, WikiPage could have a getXyzUpdater( Revision ) methods that would return an intermediate implementation of that interface. The instance returned by WikiPage could be specific for the WikiPage, and make use of the state of WikiPage for caching the rendered version.