How to implement caching in android app for REST API results?

前端 未结 3 2159
失恋的感觉
失恋的感觉 2020-12-14 02:52

My android app gets its data using REST API. I want to have client side caching implemented. Do we have any inbuilt classes for this?

if not, is these any code that

3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-14 03:38

    One of the best ways is to use Matthias Käppler's ignited librarys to make http requests that caches the responses in memory (weak reference) and on file. Its really configurable to do one or the other or both.

    The library is located here : https://github.com/mttkay/ignition with examples located here : https://github.com/mttkay/ignition/wiki/Sample-applications

    Personally, I love this lib from when it was called Droidfu

    Hope this helps you as much as it did me Ajay!

提交回复
热议问题