Open sergiofdez4 opened 1 year ago
@sergiofdez4 What do you need in the docs?
On how to clear cache. clear
method does not exist (v.1.3.0). We're looping through the cache object and deleting each key. We're not sure if it is the best approach though. Any feedback is appreciated. Thanks for the quick response too.
Thank you! As the docs say, modifying the cache data directly is not a recommended way because it might cause unexpected behaviors.
In v2 (RC), there is a new feature to mutate multiple data, and it can be used as a way to clear cache data. We've added it in the v2 docs. https://beta-swr.vercel.app/docs/advanced/cache#modify-the-cache-data
Would you mind updating the docs when possible? https://swr.vercel.app/docs/advanced/cache (great library btw...)