Which storage type in dcc.store shall one use for web deployment

Hi all! I’m trying to deploy my first web app using Heroku. My app has three tabs. Each tab has an independent data source . My question regards to the storage type of dcc.store. Which of the options is the faster and most efficient to query data?

Dash documentation presents three types: memory, local or session. I’m requesting this little help since I have no experience with web deployment.

Thanks in advance!

Hi @rber, it really depends on what you want to achieve!

  • The memory option keeps data stored only as long as the page is displayed but will forget it as soon as the page is refreshed or the Store object is removed from the DOM (e.g. with multi-page apps).
  • The session option keeps data stored in the current session. It will therefore survive a page refresh or when the Store object is removed from the DOM but will be forgotten if you close the page and re-open it.
  • The local option keeps the data stored in your browser’s local storage. It will survive all of the above and should be forgotten only when the borwser’s cache is cleared.

Hope this helps!

1 Like

Thanks, @RenaudLN. Very helpful!