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 2021/04/26 18:06:11 UTC
[GitHub] [superset] suddjian commented on a change in pull request #14357: feat: Add etag caching to dashboard APIs
suddjian commented on a change in pull request #14357:
URL: https://github.com/apache/superset/pull/14357#discussion_r620530965
##########
File path: superset/dashboards/dao.py
##########
@@ -54,6 +55,21 @@ def get_datasets_for_dashboard(id_or_slug: str) -> List[Any]:
def get_charts_for_dashboard(id_or_slug: str) -> List[Slice]:
return DashboardDAO.get_by_id_or_slug(id_or_slug).slices
+ @staticmethod
+ def get_dashboard_changed_on(id_or_slug: str) -> datetime:
Review comment:
I believe this could also be affected by datasets `changed_on`, but adding that would make this a fairly slow operation to check. The slices `changed_on` check could also be skipped for `/dashboard/:id_or_slug`. Maybe it would be better to have a separate method per endpoint?
--
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