mirror of
https://github.com/apache/superset.git
synced 2026-04-20 16:44:46 +00:00
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:
committed by
GitHub
parent
ce1e18b31b
commit
d5ba88b407
@@ -1,8 +1,14 @@
|
||||
/* eslint camelcase: 0 */
|
||||
export function getExploreUrl(form_data, dummy, endpoint = 'base') {
|
||||
export function getExploreUrl(form_data, endpoint = 'base', force = false) {
|
||||
if (!form_data.datasource) {
|
||||
return null;
|
||||
}
|
||||
const [datasource_id, datasource_type] = form_data.datasource.split('__');
|
||||
let params = `${datasource_type}/${datasource_id}/`;
|
||||
params += '?form_data=' + encodeURIComponent(JSON.stringify(form_data));
|
||||
if (force) {
|
||||
params += '&force=true';
|
||||
}
|
||||
switch (endpoint) {
|
||||
case 'base':
|
||||
return `/superset/explore/${params}`;
|
||||
|
||||
Reference in New Issue
Block a user