I noticed that a query on the stackoverflow data is cached after first execution. This is quite good, but how to force a re-execution? Since the underlaying data changed the query results are no more consistent with the present situation.
What is meta?
- Any Stack Exchange user can ask a question
- The community provides support, votes on ideas, and reports bugs
- Your voice helps shape the way Stack Exchange operates
The data on data.stackexchange.com is "cached"; the data sets are updated once a month or so. Queries are not done against the live SE databases. See the data.se.com FAQ:
I don't think the query results are cached for any significant length of time, but the result of any one query and parameter combination is not going to change until the next data update has taken place.
While it's true that the general problem is that the data simply isn't live, the results of executing a query with a particular set of parameters absolutely are cached, and there isn't any way that normal users can purge them.
This can have some impact on the apparent correctness of the results if you use something in your query that's based on the current time, since after the first execution the selected reference point is locked in until that cache is cleared.
Since the data is only updated every month or so, though, it typically doesn't make sense to use the current time in your query at a granularity where it would be noticed anyway (i.e. the current day or hour). As such, the visible impact of the cache is quite insignificant*.
Currently, the cache will persist from the time that query is first run to the time that the cache is cleared manually. This manual purge is part of the process which updates the site statistics on the front page of the site, so you can be guaranteed that the cache will be cleared every time the underlying data is updated.
* However, if someone feels that there are cases where this isn't true, feel free to provide examples and I'll take a look
Data.SE is loaded with database dumps every month--it's not a cache you're encountering, and the data on data.SE is not updated live.
The last time it was updated was about a week back, so you probably need to wait ~three weeks for the next update.