**Feature summary:**
Introduce a `{{CACHEREFRESH:...}}` parser function that allows editors to define a maximum cache validity interval for a page, triggering automatic cache invalidation at a specified frequency.
**Use case(s):**
Some wiki pages display content that changes depending on external factors but is not directly tied to edits, making normal cache invalidation insufficient.
A concrete example is the Main Page on Latin Wikipedia, which displays a daily “Article of the Day”. The selected article is automatically updated after midnight based on a pre-generated queue of featured pages. However, because the page output is cached by the system and the cache is not always refreshed promptly, outdated content can be served. This may result in issues such as the same article being displayed for multiple days or the next scheduled article not appearing as expected.
Currently, this issue is mitigated by manually purging the page cache (e.g. via a purge button or manual action) after midnight. This is fragile and requires human intervention every day, which is neither scalable nor reliable.
**Benefits:**
This feature would allow editors to declaratively specify cache refresh constraints directly in wikitext, removing the need for manual purging and reducing reliance on operational workarounds.
It would improve reliability for pages with time-sensitive but regularly scheduled content (e.g. Main Pages, portals, rotating highlights, or other templated daily/weekly content).
The proposed syntax could be like the following:
```
{{CACHEREFRESH:hourly}}
{{CACHEREFRESH:daily}}
{{CACHEREFRESH:weekly}}
{{CACHEREFRESH:monthly}}
etc.
```
The `{{CACHEREFRESH:...}}` parser function would expand to an empty string more or less like `{{DISPLAYTITLE:...}}` does.
Since it could be inserted by templates and these can require conflicting refresh rates, if multiple `{{CACHEREFRESH:...}}` declarations are present in the same page, the most restrictive value (i.e. the shortest cache interval / highest refresh frequency) should take precedence without generating errors.
Optionally, future extensions could allow specifying an exact time within the interval:
```
{{CACHEREFRESH:hourly|14:32:24}}
```