react-data-fetching
react-data-fetching copied to clipboard
Add caching
Using a cache system would be great.
The cache could be an external module to prevent dependency on LocalStorage or Redux Store.
An extra could be the following process:
- Return the result from cache straight away
- Continue the fetch in backgroung
- When the succeed, update the cache
- Return the up-to-date result again for a re-render
Hey @luizbon! Caching is indeed a feature that I've put down on the todo inside the README. And I'm more and more convinced that this is something that will be handled by React's Suspense itself. So my position right now is to wait for their caching solution to be officially out there, and see how we can adopt it for React Data Fetching. However, I'm open to any recommendation/idea!