Page MenuHomePhabricator

JsonConfig keeps returning stale cached dataset for a while
Closed, ResolvedPublic

Description

=mw.text.jsonEncode( mw.ext.data.get('templatedata/Graph:Lines.tab')['schema']['fields']) (called from Lua debug console) keeps returning stale data, even though =mw.text.jsonEncode( mw.ext.data.get('Templatedata/Graph:Lines.tab')['schema']['fields'])` returns the up to date value. The first letter in uppercase seems to change the caching key (resolves to the same title internally).

Trying this on any other wiki works the same way, so the caching bug is not per-wiki.

https://en.wikipedia.org/w/api.php?action=jsondata&formatversion=2&format=jsonfm&title=templatedata/Graph:Lines.tab also exhibits the same issue.

Event Timeline

Yurik added a subscriber: Krinkle.
Yurik renamed this task from Lua keeps returning stale cached dataset for a while to JsonConfig keeps returning stale cached dataset for a while.Jan 13 2017, 6:23 AM
Yurik updated the task description. (Show Details)

It actually appears this is due to the first letter casing being different, and not being normalized by the jsonconfig title parser

Change 332089 had a related patch set uploaded (by Yurik):
Fix cross-wiki title normalization

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

Change 332089 merged by jenkins-bot:
Fix cross-wiki title normalization

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

Krinkle claimed this task.