HttpResponseCache
HttpResponseCache copied to clipboard
Add support for non-shared cache?
HttpResponseCache (in android) has been implemented following the guidelines for a shared cache. This means that requests containing an 'Authorization' header are never cached, while you might want this in some cases.
When installing a cache, a flag could indicate wheter you want it to behave as shared or non-shared (private). It is then obviously up to the developer to make sure no sensitive informations such as credentials are cached on the filesystem.
Hmm, that would be nice...
Can you report this request at https://code.google.com/p/android/ as well, so it gets upstream too?
And if you wanted to submit a pull request implementing that feature, that would be really awesome!
I've added the request here: https://code.google.com/p/android/issues/detail?id=40969 I'll see about implementing the feature when I have some spare time!
Hi @sgdesmet I saw your commit https://github.com/sgdesmet/HttpResponseCache/commit/1b5d4c0d9273d72cc54bbe96d4034a372e03092d
Any plans of submitting a pull request and merging it? Is this working?
Yes, I'm planning on creating a pull request for. I could make one now, but I haven't implemented any unit tests for it (been kinda swamped with work unfortunately, sorry)... It seems to be working well, we're using it in an app we've recently published.