9

I want to enable HttpCaching for my Android app, so I'm looking for a library project to depend upon. CachingHttpClient looks nice, but uses Apache HttpClient 4.1 and Android only includes 4.0

So, are there any other good http-cache projects for java that are usable on Android?

Keith Thompson
  • 254,901
  • 44
  • 429
  • 631
user331244
  • 601
  • 9
  • 19
  • Have you looked at implementing a cache your self? I don't know what type of caching you're looking for, if its just the response or the entire HTML that's in a WebView. For the WebView way you can intercept the url being loaded and send cached HTML to it. If its just the responses, why not quickly write a caching class that decides when to use cached data and when to invalidate and pass through to the HttpClient. – Kevin Parker Oct 30 '11 at 00:00
  • I do not use a webview, I want to make my REST API access more data efficient. You are probably right, I will end up righting a cache handling class. But I am pretty sure some one else already has :-B And even if the problem is limited I am sure there is an existing, tested solution... – user331244 Oct 30 '11 at 07:22
  • Have a look at GSON, it will serialize your objects so you can store and retrieve them easily from say, Android's Shared Preferences. http://code.google.com/p/google-gson/ Its what we do when we need to store persistent serialized data on Android. – Kevin Parker Oct 30 '11 at 15:21
  • GSON is nice but is not what I'm looking for. I am talking about the stuff described here http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html – user331244 Oct 31 '11 at 19:00
  • Why not just use HttpClient 4.1 directly? I'm using it without problem. – Jeff Axelrod Aug 12 '12 at 18:43

0 Answers0