Hi,
I found that Special:EntityData returns outdated JSON data that is not in agreement with the page. I have fetched the data using wget to ensure that no browser cache is in the way. Concretely, I have been looking at
https://www.wikidata.org/wiki/Special:EntityData/Q17444909.json
where I recently changed the P279 value from Q217594 to Q16889133. Of course, this might no longer be a valid example when you read this email (in case the cache gets updated at some point).
Is this a bug in the configuration of the HTTP (or other) cache, or is this the desired behaviour? When will the cache be cleared?
Thanks,
Markus
Output from Special:EntityData is cached for 31 days. Looking at the code, it seems we are not automatically purging the web caches when an entity is edited - please file a ticket for that. I think we originally decided against it for performance reasons (there are quite a few URLs to purge for every edit), but I suppose we should look into that again.
You can force the cache to be purged by setting action=purge in the request. Note that this will purge all serializations of the entity, not just the one requested.
-- daniel
Am 29.02.2016 um 22:02 schrieb Markus Krötzsch:
Hi,
I found that Special:EntityData returns outdated JSON data that is not in agreement with the page. I have fetched the data using wget to ensure that no browser cache is in the way. Concretely, I have been looking at
https://www.wikidata.org/wiki/Special:EntityData/Q17444909.json
where I recently changed the P279 value from Q217594 to Q16889133. Of course, this might no longer be a valid example when you read this email (in case the cache gets updated at some point).
Is this a bug in the configuration of the HTTP (or other) cache, or is this the desired behaviour? When will the cache be cleared?
Thanks,
Markus
Wikidata-tech mailing list Wikidata-tech@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-tech
Hi!
Output from Special:EntityData is cached for 31 days. Looking at the code, it seems we are not automatically purging the web caches when an entity is edited - please file a ticket for that. I think we originally decided against it for performance reasons (there are quite a few URLs to purge for every edit), but I suppose we should look into that again.
That would be nice. Right now I'm using cache-defeating URL to fetch data in WDQS because obviously getting 31-day old data is not good. But if data for Special:EntityData URLs would be purged on edit that could allow to simplify that part a bit and maybe also save some performance impact when running multiple WDQS instances.
You can force the cache to be purged by setting action=purge in the request. Note that this will purge all serializations of the entity, not just the one requested.
That also what would happen on edit, I assume.
Hi,
Yes, 31 days is indeed quite long.
Another workaround for some people might be to use the API (action=wbgetentties) instead. However, this was not so easy for me since my JavaScript application complains about the cross-site request here even though this action is only for reading and has no sensitive functionality (such as login). I am sure that there is some way around this, but I would have to look into it. I will use the purge for now.
Thanks,
Markus
On 29.02.2016 23:59, Stas Malyshev wrote:
Hi!
Output from Special:EntityData is cached for 31 days. Looking at the code, it seems we are not automatically purging the web caches when an entity is edited - please file a ticket for that. I think we originally decided against it for performance reasons (there are quite a few URLs to purge for every edit), but I suppose we should look into that again.
That would be nice. Right now I'm using cache-defeating URL to fetch data in WDQS because obviously getting 31-day old data is not good. But if data for Special:EntityData URLs would be purged on edit that could allow to simplify that part a bit and maybe also save some performance impact when running multiple WDQS instances.
You can force the cache to be purged by setting action=purge in the request. Note that this will purge all serializations of the entity, not just the one requested.
That also what would happen on edit, I assume.
On Tue, Mar 1, 2016 at 8:02 AM Markus Krötzsch < markus@semantic-mediawiki.org> wrote:
Hi,
Yes, 31 days is indeed quite long.
Another workaround for some people might be to use the API (action=wbgetentties) instead. However, this was not so easy for me since my JavaScript application complains about the cross-site request here even though this action is only for reading and has no sensitive functionality (such as login). I am sure that there is some way around this, but I would have to look into it. I will use the purge for now.
Thanks,
Markus
I have created https://phabricator.wikimedia.org/T128486 now to purge the cache after an edit.
Cheers Lydia
wikidata-tech@lists.wikimedia.org