I built a Custom UI dashboard gadget that calls a backend function to collect and process some data. I want the user to be able to switch between the gadget config (edit.js) and the view (view.js) to iterate on tuning some config settings to set up their view exactly the way they want. It’s annoying that the gadget refreshes and hits the backend every time the user switches between the edit and view (by hitting save or cancel on the gadget config).
Has anyone worked out a solution to cache some data in memory on the frontend so the user can quickly iterate between the config and the view? It seems like the app.js, view.js and edit.js are all created and destroyed when the user switches from the config, hits save (or cancel) and goes back to the view, which makes this difficult.