Fixing the CACHING (#2203)

Caching wasn't working after deprecate_v1, this addresses it. Also surfacing
whether the data is served from cache in explore view and a way to force
run the query bypassing the cache.
This commit is contained in:
Maxime Beauchemin
2017-02-22 08:31:31 -08:00
committed by GitHub
parent ce1e18b31b
commit d5ba88b407
8 changed files with 39 additions and 14 deletions

View File

@@ -229,9 +229,9 @@ export function updateChartStatus(status) {
}
export const RUN_QUERY = 'RUN_QUERY';
export function runQuery(formData, datasourceType) {
export function runQuery(formData, force = false) {
return function (dispatch) {
const url = getExploreUrl(formData, datasourceType, 'json');
const url = getExploreUrl(formData, 'json', force);
const queryRequest = $.getJSON(url, function (queryResponse) {
dispatch(chartUpdateSucceeded(queryResponse));
}).fail(function (err) {