You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/09/24 00:38:23 UTC

[GitHub] [incubator-superset] graceguo-supercat commented on pull request #10963: feat: enable ETag header for dashboard GET requests

graceguo-supercat commented on pull request #10963:
URL: https://github.com/apache/incubator-superset/pull/10963#issuecomment-698043672


   `etag_cache` decorator works this way:
   
   - explore_json flow:
   
   1. http request come in
   
   1. check_slice_perms
   
   1. if method is POST, run query (not use cache). Otherwise check if this request has cache.
   
   1. if no cached response, run query and create a cache key for the response
   
   1. send response to client-side, with eTag header, last_modified header and expiration time header. last_modified time is now (response time).
   
   
   - dashboard flow:
   1. http request come in
   
   1. check_dashboard_perms
   
   1. if method is POST, or feature is not enable, run dashboard function to build response (not use cache). Otherwise check if this request has cache.
   
   1. if no cached response, run dashboard function.
   
   1. if has cache, compare cached time with dashboard last modified time: it could be dashboard's changed_on > last cache_time or any slice's changed_on > last_cache_time. If cache is stale, run dashboard function.
   
   1. send response to client-side, with eTag header, last_modified header and expiration time header. last_modified time is max of (dashboard and its slices)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org