Kong / swrv

Stale-while-revalidate data fetching for Vue

Home Page:https://docs-swrv.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exceed the quota exception

ThinhVu opened this issue · comments

Exceed the quota

Screenshot 2023-07-02 at 6 36 45 AM

The swrv cache, specifically localStorage, in all browsers has limits. It’s typically the responsibility of the host app to manage what it stores in the cache.

We could add some error handling here around the setItem logic; however, this would likely suppress the error to the host application.

The swrv cache, specifically localStorage, in all browsers has limits. It’s typically the responsibility of the host app to manage what it stores in the cache.

We could add some error handling here around the setItem logic; however, this would likely suppress the error to the host application.

This is the PR. It does not aim to fix the bug, just ignore it to prevent application breaks. At least the data can be returned so we can consider the fix as a fallback.

#351

@ThinhVu see if #353 resolves the issue for you

This is now released in 1.0.4