title: IndexedDb per multiple users
body: <p>I have a question about IndexedDb best practices, how to manage different users' data. </p>
  
  <p>Scenario: I have a mysql database containing system data. When user login to the system, I synchronize his data from mysql into IndexedDb and then web application uses data stored directly in indexeddb. When user login next time to the system, full synchronization is not needed because his data is already stored locally.</p>
  
  <p>Problem is when user logs out, and then on the same computer another user login into the system, because IndexedDb contains data for previous user.</p>
  
  <p>Is there any best practice for managing such scenario? Because for now I see 2 options:</p>
  
  <ol>
  <li>On the logout and login action always clear indexeddb data. Disadvantage is that in that case every time user login to the system I need to perform full synchronization.</li>
  <li>Get rid of IndexedDb, because it shouldn't be used for that scenario and get data directly from mysql.</li>
  <li>?? &lt;- Please maybe you have an idea how to avoid full synchronization every time user login, and keep another users data safe from reading.</li>
  </ol>
  
  <p>Thanks,</p>