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 2019/04/23 01:06:41 UTC

[GitHub] [incubator-superset] graceguo-supercat commented on issue #7340: Caching charts in Superset

graceguo-supercat commented on issue #7340: Caching charts in Superset
URL: https://github.com/apache/incubator-superset/issues/7340#issuecomment-485604321
 
 
   Designing a simple cache system, we have to keep list of things in mind:
   - cache key
   - cache age
   - cache size
   - eviction policy
   - and more...
   
   `Dataframe cache` in Superset is pretty stable. It used query object as key, and cache age is configurable: `CACHE_DEFAULT_TIMEOUT = None`. We don't offer much start algorithm to evict cache, unless allow user to `force refresh` an existed query. Cached content size is varies from single row up to 50K rows, depends on the user's data. If user configure Superset to use redis as caching backend, cache size is not a concern by now.
   
   In #7032 and apache-superset/superset-ui#119, you introduced 2 layer of caching: client-side cache and server cache (by using ETag). Let's see how it works (as of today in `master` branch):
   
   **client-side cache:**
   - cache key: request url
   - cache age: ??? 
   - cache size: ??? 
   - eviction policy: ??? 
   using request url as key in client-side cache is problematic. for example, user A can changed slice_1, added another filter, saved it. Then User B can see this change? When browser cache expires? what if browser cache is full? I feel this client-side cache system is not scalable, and hard to debug.
   
   **server-side ETag**
    

----------------------------------------------------------------
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


With regards,
Apache Git Services

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