Page MenuHomePhabricator

Consistently ensure ParserOutput using a stub threshold does not get cached.
Closed, ResolvedPublic

Description

Currently, a special case for a non-zweo stub-threshold is implemented in WikiPage::shouldCheckParserCache. It would be more logical to either have Parser mark content as uncacheable if it uses a stub threshold. Or to have ParserCache maintain a list of "cache breaking" options, that we don't want to vary on.

The background is that the sub threshold can be any arbitrary number, so it can potentially fragment the cache by a large factor for little benefit. The option seems to no longer be present in the preferences UI, and has long been proposed for removal, see T30426: Remove stub link formatting user preference from MediaWiki core.

Event Timeline

BPirkle renamed this task from Consistently ensure ParserOutput using a stub threthold does not get cached. to Consistently ensure ParserOutput using a stub threshold does not get cached..Oct 6 2020, 5:37 PM

Why does stubthreshold get such preferential treatment? We include it into the cache key and then we separately check in multiple places whether it's set and disable the cache manually. Why don't we simply remove it from the cache key - then for ParserOptions with non-default value isSafeToCache will start returning false and ParserCache will be consistently disabled. This will work just like any other non-cache-splitting option.

Change 646743 had a related patch set uploaded (by Ppchelko; owner: Ppchelko):
[mediawiki/core@master] Remove 'stubthreshold' from ParserCache key.

https://gerrit.wikimedia.org/r/646743

Change 646743 merged by jenkins-bot:
[mediawiki/core@master] Remove 'stubthreshold' from ParserCache key.

https://gerrit.wikimedia.org/r/646743

Pchelolo claimed this task.