Open 99of9 opened 2 years ago
As I wrote on Wikidata, I think the cache should be cleared even if there’s no version upgrade for some time (or maybe not used at all), as not only query changes make the cache invalid, but also edits to Wikidata. It’s not that huge amount of data, I don’t think the cache should last longer than a few hours at most.
Also, whatever method you choose, make sure not to crash if you get the old format—since this cache never expires, there may be users with the old format for an indefinite amount of time. (For example, users like me who have the extension installed but disabled for months or even years.)
This should have been fixed for some time in Chrome. Firefox might have it already too, but I just submitted 0.9.5 to FF which will fully update it (and improves other language handling a lot).
@tacsipacsi The latest versions have had a lot of language handling improvements. I'd be interested in how it works in your language if you have a moment to test it out again.
It looks plausible that the cached languages list is outlasting version upgrades (even when they change the query!). Tipoff here: https://www.wikidata.org/w/index.php?title=Wikidata_talk%3AEntity_Explosion&type=revision&diff=1507369321&oldid=1507223474
More aggressive updating of the cached data looks necessary.
Code illustrating sunset clauses on cached data here: https://stackoverflow.com/questions/31766467/how-do-i-cache-data-in-chrome-extension