How to use Android's CacheManager?

后端 未结 2 1858
一生所求
一生所求 2021-01-04 12:09

I\'m currently developing an Android application that fetches images using http requests. It would be quite swell if I could cache those images in order to improve to perfor

相关标签:
2条回答
  • 2021-01-04 12:24

    I don't think the CacheManger can be used outside of a WebView as noted in this bug report http://code.google.com/p/android/issues/detail?id=7222

    0 讨论(0)
  • 2021-01-04 12:25

    I came across this issue awhile ago as well. The cache manager is only for the webview and not really useful outside of that. For my application I needed to cache xml responses and images so I ended up writing my own cache manager to accomplish that. Nothing too terrible but certainly not as easy as using a would-be built-in one.

    If you have any questions about the specifics, add a comment to my post, I check back frequently.

    0 讨论(0)
提交回复
热议问题