koriUA / rxjs-store-persist

ngrx-store-persist depends on @ngrx/store and angular 2+
13 stars 9 forks source link

Add service to clear the storage ad-hoc #1

Closed Exocomp closed 4 years ago

Exocomp commented 5 years ago

Hi there, nice library, would it be possible to add a service I can inject then call a function to delete the indexedDb. For example, upon logout, I would like to call such a method to delete any data.

koriUA commented 4 years ago

Hi. Thanks. I guess you don't need such service. You can just dispatch action to clear the store on logout and rxjs-store-persist automatically synchronizes indexedDb and cleares the store. In your case, if you clear indexedDb but don't clear store there will be desynchronization beetwen store and indexedDb.