-1

As the user scrolls up, in this scenario should request go again and get new data or it shows previously loaded data?

In my case every time a new request has gone to the server. How I handle it?

Vikram Shekhawat
  • 627
  • 2
  • 8
  • 12

1 Answers1

0

You need to implement a cache layer between Scroller and Network adapter. This can be done with the framework API near the Network (all the frameworks you mentioned in the tag list have such API: angularjs, angular, jquery). Or you can implement caching alongside the Scroller, but this is highly dependent on the Scroller implementation and the App-Scroller integration. In two words, you need to cache a response by its request params, and if params of some request match the cached ones, use cached response (otherwise, perform the request and cache its response).

dhilt
  • 18,707
  • 8
  • 70
  • 85