Page MenuHomePhabricator

Allow Entity pages to be stored in the ParserCache
Closed, ResolvedPublic

Description

Since the rendering of Entity pages depend on the user's language, even for anonymous users, they are currently not cached. This is a big performance issue.

MediaWiki usually forces the parser cache key for anonymous visitors to 'canonical'. This should be overwritten for Wikibase, and a cache key should be generated based on the user preferences, just like for logged in users.

On a related note, we could try to avoid MediaWiki parsing and caching pages directly upon saving them, since it's unclear which cache key is used for that, and it seems pointless for bot edits.


Version: unspecified
Severity: normal
Whiteboard: u=dev c=backend p=0

Details

Reference
bz57746

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:30 AM
bzimport set Reference to bz57746.
bzimport added a subscriber: Unknown Object (MLST).

Change 98511 had a related patch set uploaded by Daniel Kinzler:
(bug 57746) Allow entity pages to use parser cache

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

Change 98511 merged by jenkins-bot:
(bug 57746) Allow entity pages to use parser cache

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

This was reverted on the deployment branch, due to several issues:

a) old parser cache "pointer" entries in the cache causing entity content in random languages to be shown. Should be solvable by bumping wgCacheEpoch when deploying.

b) The term box ("in other languages" section) is user-specific and can not be cached, see bug 58342

c) EntityView uses the language from the context object, instead of the language given by the parser options for generating output. See 58344

(In reply to Daniel Kinzler from comment #0)

MediaWiki usually forces the parser cache key for anonymous visitors to
'canonical'. This should be overwritten for Wikibase, and a cache key should
be generated based on the user preferences, just like for logged in users.

Nice. Will this bring us any closer to having ULS language selection enabled for anonymous users (bug 56464 and friends)? This area would greatly use some atomic bug reports for each component of the issue...

(In reply to Nemo from comment #4)

Nice. Will this bring us any closer to having ULS language selection enabled
for anonymous users (bug 56464 and friends)?

Nope. The problem is at front-end caching level.