Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

Feat: improve caching #137

Closed
wants to merge 1 commit into from
Closed

Feat: improve caching #137

wants to merge 1 commit into from

Conversation

betodealmeida
Copy link
Contributor

@betodealmeida betodealmeida commented Apr 17, 2019

🏆 Enhancements

This PR changes SupersetClient so that it can reuse cached responses using the Cache API, in addition to delegating it to the browser. This allows us to pass cache: 'no-cache', bypassing the browser caching and handling it ourselves.

The reason for this is that using the native browser cache we're unable to invalidate the cache from Javascript, eg, when a user saves a new chart of force refreshes a dashboard. Using the Cache API we can easily do that, clearing all cached responses that reference a chart (see apache/superset#7319).

@betodealmeida betodealmeida added the #enhancement New feature or request label Apr 17, 2019
@betodealmeida betodealmeida requested a review from a team as a code owner April 17, 2019 21:50
@betodealmeida
Copy link
Contributor Author

@kristw @xtinec I'm getting unrelated build errors in this PR, any idea what might be going on?

@ktmud
Copy link
Contributor

ktmud commented Jul 7, 2020

@betodealmeida I've made some change to callApi and there are more changes coming in #666 . Do we still want to keep changes in this PR? How much does the caching actually helps the end user? I suspect it only saves some (mostly intranet) network request as the DB query on the server side should already be cached?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
#enhancement New feature or request size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants