The line:
```
local ispreview = frame:preprocess( "{{REVISIONID}}" ) == "" and 1 or 0
```
is extremely bad for performance since:
a) it disables edit stashing on any page that uses this template (e.g. via infoboxes).
b) it causes a double parse on edit due to vary-revision in doEditUpdates()
Maybe a dedicated {{PREVIEWMODE}} word can be added instead?
Edit stash graphs: https://grafana.wikimedia.org/dashboard/db/edit-stash
I suspect most of the "uncacheable" sector of the pie is from this.
List of main enwiki templates doing this:
* Module:Check for unknown parameters
* Module:Convert
* Module:Citation/CS1
* Module:TemplatePar
-------
## Preview detection
The most common use case for `{{REVISIONID}}` is to detect preview mode. This will not be broken.
The magic word will still be valid in wikitext, and will still return "" (empty string) when previewing edits, and something else (a dash) when reading pages after saving the edit.
## Edit summary permalinks for advanced user actions
On Meta-Wiki, it is common to use `{{REVISIONID}}` in combination with `{{fullurl:}}` to give privileged users a way to quickly perform an action with the edit summary already pre-configured to reference the current version of the page. For example, when fulfilling a request from another user.
This feature has been accommodated with a small JavaScript snippet, that can be used in templates via `class="tpl-permalink-reason"`. An example can be found at [Meta-Wiki JS](https://meta.wikimedia.org/wiki/MediaWiki:Group-user.js) and [Template:Checkuser](https://meta.wikimedia.org/wiki/Template:Checkuser).