What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 133 Stack Exchange communities.

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.

share|improve this question

3 Answers 3

up vote 3 down vote accepted

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:

How frequently is Stack Exchange Data Explorer updated?
Data is updated monthly.

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.

share|improve this answer

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.

share|improve this answer
    
Data has been updated monthly of late. The faq also reflects this. –  Martijn Pieters Jul 9 '12 at 7:49

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

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .