HttpResponseCache icon indicating copy to clipboard operation
HttpResponseCache copied to clipboard

Add support for non-shared cache?

Open sgdesmet opened this issue 12 years ago • 4 comments

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.

sgdesmet avatar Dec 04 '12 13:12 sgdesmet

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!

candrews avatar Dec 04 '12 22:12 candrews

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!

sgdesmet avatar Dec 05 '12 14:12 sgdesmet

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?

burgalon avatar Mar 13 '13 18:03 burgalon

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.

sgdesmet avatar Mar 15 '13 13:03 sgdesmet