diff options
author | Timo Tijhof <krinkle@fastmail.com> | 2023-03-02 19:54:02 +0000 |
---|---|---|
committer | Krinkle <krinkle@fastmail.com> | 2023-03-05 02:20:23 +0000 |
commit | adcad48159a9a93ca59d4e0901f6aa7511f451aa (patch) | |
tree | 4d9bf751ee3bd3fb9fc49a9bff0e3c9a3c8be91b /docs/pageupdater.md | |
parent | a04e191f42ab32b0919a80601a3fa11b6e7fa844 (diff) | |
download | mediawikicore-adcad48159a9a93ca59d4e0901f6aa7511f451aa.tar.gz mediawikicore-adcad48159a9a93ca59d4e0901f6aa7511f451aa.zip |
editpage: Minor docs and file header cleanup
* Remove duplicate descriptions from file blocks in favour of class
doc blocks. This reduces needless duplication and incorrect or
outdated copies, and helps to make the file header more consistently
visually ignorable.
* Clean up the file header, similar to other commits under
<https://gerrit.wikimedia.org/r/q/message:ingroup+owner:Krinkle>.
Change-Id: I31b137b1d6c75eb042d935b99f92ef47652596ec
Diffstat (limited to 'docs/pageupdater.md')
-rw-r--r-- | docs/pageupdater.md | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/pageupdater.md b/docs/pageupdater.md index 71df9a75ff64..51e85cccee0b 100644 --- a/docs/pageupdater.md +++ b/docs/pageupdater.md @@ -3,7 +3,8 @@ PageUpdater This document provides an overview of the usage of PageUpdater and DerivedPageDataUpdater. -## `PageUpdater` +## PageUpdater + `PageUpdater` is the canonical way to create page revisions, that is, to perform edits. `PageUpdater` is a stateful, handle-like object that allows new revisions to be created on a given wiki page using the `saveRevision()` method. `PageUpdater` provides setters for defining the new revision's content as well as meta-data such as change tags. `saveRevision()` stores the new revision's primary content and metadata, and triggers the necessary updates to derived secondary data and cached artifacts e.g. in the `ParserCache` and the CDN layer, using a `DerivedPageDataUpdater`. @@ -66,7 +67,8 @@ $newRev = $updater->saveRevision( $comment, EDIT_UPDATE ); In both cases, all secondary updates will be triggered automatically. -# `DerivedPageDataUpdater` +## DerivedPageDataUpdater + `DerivedPageDataUpdater` is a stateful, handle-like object that caches derived data representing a revision, and can trigger updates of cached copies of that data, e.g. in the links tables, `page_props`, the `ParserCache`, and the CDN layer. `DerivedPageDataUpdater` is used by `PageUpdater` when creating new revisions, but can also be used independently when performing meta data updates during undeletion, import, or when puring a page. It's a stepping stone on the way to a more complete refactoring of WikiPage. |