Page MenuHomePhabricator

Bump parser cache for wikibase content based on version
Closed, ResolvedPublic3 Estimated Story Points

Description

Wikibase does special things (custom html, etc) with what goes into the parser cache. When we deploy new code, we sometimes need to bump $wgCacheEpoch, because of UI changes. We don't bump cache epoch every deploy, so this would make sense as a version constant or such.

I see that Parser has a version constant that is used as part of determining expiry in CacheTime.

It would be great if a Wikibase "Parser" version could also be used in determining cache expiry.

Event Timeline

aude raised the priority of this task from to Needs Triage.
aude updated the task description. (Show Details)
aude added projects: MediaWiki-Parser, Wikidata.
aude subscribed.
Lydia_Pintscher set Security to None.
Lydia_Pintscher added subscribers: daniel, JanZerebecki.
Lydia_Pintscher raised the priority of this task from Medium to High.Jan 14 2015, 11:48 AM
Lydia_Pintscher moved this task from incoming to ready to go on the Wikidata board.

looks like PageRenderingHash would work for this.

gerritbot subscribed.

Change 188277 had a related patch set uploaded (by Aude):
Add version constant for EntityContent for parser options

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

Patch-For-Review

PageRenderingHash doesn't know anything about content model / type.

looks like the best way is ParserOptions::addExtraKey, which can be used for EntityContent while for non-entity content, we don't need to interfere. We can have a version constant for EntityContent that we bump when we have breaking changes.

then when we deploy, the version change / cache bump goes out same time as the code changes vs. trying to handle this in a wmf config setting.

aude renamed this task from Add hook for extensions to bump or expire parser cache to Bump parser cache for wikibase content based on version.Feb 3 2015, 2:39 AM

Change 188277 merged by jenkins-bot:
Add version constant for EntityContent for parser options

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

hoo subscribed.

Patch approved... now we "only" need to remember to bump that constant whenever we do breaking changes.