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 created this task.Jan 13 2017, 6:16 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 13 2017, 6:16 AM
Yurik updated the task description. (Show Details)Jan 13 2017, 6:16 AM
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)
Yurik added a comment.Jan 13 2017, 9:03 AM

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

debt moved this task from Backlog to Needs review on the Maps-Sprint board.

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

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

Krinkle closed this task as Resolved.Jan 25 2017, 12:36 AM
Krinkle claimed this task.
Deskana moved this task from Needs review to Done on the Maps-Sprint board.Apr 19 2017, 4:27 PM