zhaoyongjie commented on pull request #18576: URL: https://github.com/apache/superset/pull/18576#issuecomment-1039072544
> > The current solution causes the same session to have different cache keys due to different tab keys. Imagine if the user created 5 tabs, the cache system has to create 5 cache records. For this high-frequency operation, do we consider using some data structures to solve it? > > In the future, we can also improve `for_data_key = {tab-key: value}` into `for_data_key = LRU_ordered_dict` to optimize memory space. > > I think this could be a further optimization that we can implement in the future 👍🏼 > Server-side save tab_id can avoid client tab collision and reduce complexity. > > Second, could we consider using `window.sessionStorage` to preserve `tab-id`? if we use `sessionStorage` and `tab-key in form_data_key`, we probably don't need to introduce a new dependence `broadcast-channel` in frontend. > > I considered this option but discarded it because of the following in [window.sessionStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage) docs: > > > Duplicating a tab copies the tab's sessionStorage into the new tab. Thanks for the explanation! `sessionStorage` is more suitable for this scenario. -- 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: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org