-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The cache key for /warm_up_cache/ differs from /explore_json/ #3840
Comments
I also noticed that in some cases the dashbboard view and the explore view somehow generate different URLs and cache keys. |
@mistercrunch would this PR not remedy the issue you've been noticing? #3809 |
Hoping so! |
@mistercrunch one solution would be to use the query string as the cache key as opposed to the form data (the query response is actually what we're trying to cache). This would resolve this issue and potentially reduce the number of keys. Note that the cache key is now slice agnostic, so if multiple slices or explorer views use the same query, force refreshing of cache will refresh all dependents. |
@john-bodley can this be closed? |
facing this issue in superset 1.1.0 where cache key is different for warm_up_cache and explore_chart |
Make sure these boxes are checked before submitting your issue - thank you!
Superset version
0.21.0dev
Expected results
Both the
/warm_up_cache/
and/explore_json/
API endpoints should produce the same cache key for a given slice. A hashed version of form-data is used for the cache key, though it seems the AJAX form-data is mutated via i) the JavaScript and ii) via theSuperset.explore_json(...)
method thus the keys are not equivalent.Actual results
Using the example dataset, the
/warm_up_cache/?slice_id=60
endpoint hashes the following string for the cache key:whereas
/slice/60/
endpoint hashes the following string for the cache key:I'm not sure what the correct way to proceed is. I presume there are a couple of options:
/warm_up_cache/
API endpoint and augment existing non-API endpoints to pass theforce
request argument, i.e.,/slice/60/?force=true
. Note the issue with this approach is one may need to use a headless browser if the intent is to systematically warm up the cache.Steps to reproduce
See above.
The text was updated successfully, but these errors were encountered: