john-bodley opened a new issue #15518:
URL: https://github.com/apache/superset/issues/15518


   I _believe_ there are a number of issues related to the `DASHBOARD_CACHE` 
feature which is currently defined as being [in 
development](https://github.com/apache/superset/blob/1e8b6eb848f322411e45b30e1c7758d99a19738d/RESOURCES/FEATURE_FLAGS.md#in-development).
 These issues are evident when editing dashboard metadata, i.e., adding an 
owner, and the upon re-editing the previous edits are not shown given that the 
cached response is leveraged.
   
   Specifically: 
   
   1. The [`check_modified and not 
object_session(obj).is_modified(obj)`](https://github.com/apache/superset/blob/f24264ccdc6bf6ab95f1969295dd9ba3612e9054/superset/models/dashboard.py#L411)
 check evaluates to `True` when updating the dashboard meaning the cache is not 
cleared.
   2. The 
[`clear_cache`](https://github.com/apache/superset/blob/f24264ccdc6bf6ab95f1969295dd9ba3612e9054/superset/models/dashboard.py#L276-L277)
 method (or similar) does not clear the etag caches  associated with the 
DashboardRestApi responses defined 
[here](https://github.com/apache/superset/blob/f24264ccdc6bf6ab95f1969295dd9ba3612e9054/superset/dashboards/api.py).
   3. The 
[`etag_cache`](https://github.com/apache/superset/blob/285c1b5d2275b168ef7c8564ff2e1397ee22ade2/superset/utils/cache.py#L125-L236)
 logic may not be correct regarding exposing how the cache key is made and thus 
when one tries to delete the memoized object, i.e., 
`cache_manager.cache.delete_memoized(DashboardRestApi.get, self.id)` the cache 
key is different.  
   
   Flask-Caching memoization is complex and I think we should try to lean 
heavily on their own memoize function and merely wrap it in a similar vein to 
https://github.com/apache/superset/issues/15396.
   
   ### Environment
   
   (please complete the following information):
   
   - superset version: `superset version`
   - python version: `python --version`
   - node.js version: `node -v`
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included 
it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version 
of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't 
found one similar.
   
   ### Additional context
   
   Add any other context about the problem here.
   


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to