CJY0208 / react-router-cache-route

Route with cache for react-router V5 like <keep-alive /> in Vue
https://www.npmjs.com/package/react-router-cache-route
MIT License
1.14k stars 110 forks source link

clearCache() dropByCacheKey() is not working ? #128

Closed yechukim closed 2 years ago

yechukim commented 2 years ago

CacheRoute works great, but I wanted to remove cache for the specific occasion but it seems not working :/ for example, I want to remove cache when back button clicked, so I called clearCache() when back button is clicked. but the list was not fetching because of cache

CJY0208 commented 2 years ago

Are you using with cacheKey prop?

yechukim commented 2 years ago

yes, I triedcacheKey prop with dropByCacheKey() and celarCache() without prop

CJY0208 commented 2 years ago

can offer your demo or code?

yechukim commented 2 years ago

almost impossible :/ it's a long code . I tried fixing this issue with reload(). looks liks caching is clear when window is reloaded no matter which page I am on

CJY0208 commented 2 years ago

This problem may be fixed in the latest version, closed