Skip to content

1.0.58 - The storage garbage collection update

Compare
Choose a tag to compare
@hazae41 hazae41 released this 05 Sep 20:31
· 796 commits to master since this release

BREAKING CHANGES

  • AsyncLocalStorage and SyncLocalStorage (along with their hooks) now accept a prefix as first parameter
useAsyncLocalStorage("mycache")

Default prefix is xswr:

CHANGES

  • Storages are now doing garbage collection out of the box! ⚡️
  • Added garbage collection on unmount and on page unload for SyncLocalStorage and AsyncLocalStorage
  • Added garbage collection on unmount and on page load for IDBStorage
  • Added collect() and unmount() methods on all storages