react-data-fetching icon indicating copy to clipboard operation
react-data-fetching copied to clipboard

Add caching

Open luizbon opened this issue 6 years ago • 1 comments

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

luizbon avatar Jul 23 '18 22:07 luizbon

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!

CharlesMangwa avatar Aug 17 '18 23:08 CharlesMangwa