Hi Dash Community,
I have 2 dash apps, I want to use a variable from my 1st app in my 2nd app. Is there anyway i can cache my data and use it in my 2nd dash app when it is launched?
P.S. - I have read about multipage dash app and it does not go with my design.
Multiple options here from past webdev, though I am also rather new to plotly / dash so there may be a more elegant setup.
- Multi page dash open each page in a different browser?
- Database of some kind. For quick and dirty I usually use JSON / python dictionary to store information. This is then edited or read from by callbacks. Depending on setup this can either be a temporary site in active memory or a file on disk, usually a combination in the long term. Keep in mind this is a make it work solution not a optimum one.
a. Not updating a file to disk may require you to use python multiprocessing to bridge the dash sessions.
b. The write to disk option is slower but write size and if it’s an SSD may negate this.
2a . Use a real database, mongo DB or something.
- There may be something internal to dash for this that I do not know of.
Hope this helps.