0

TL;DR:Does anyone know if requests made by an app via AFNetworking/NSURLConnection get stored and persisted in NSURLCache between re-installs of the app?

Background: I am troubleshooting a bizarre bug affecting some users of a shipping app, which persists across app-reinstalls and which could potentially be explained by a bad cached copy of a previous response.

The app uses AFNetworking, which sits on top of NSURLConnection, and therefore uses NSURLCache.

There is no explicit NSURLCache configuration within the app.

Hence I'm keen to know whether responses can remain in an NSURLCache past the lifetime of the app installation which originally made the request.

Andrew Ebling
  • 10,175
  • 10
  • 58
  • 75

1 Answers1

0

Depends on how the app gets reinstalled, typically. In theory, if you delete the app completely, then no, it shouldn't be possible for any app data to persist, including the URL cache, with the sole exception being certain keychain items. That said, the difference between theory and practice....

With that said, if you want to be certain, you can always create a new shared cache that stores its on-disk files in a different location than the default. That should fix the problem if it is caused by stale cache data.

dgatwood
  • 10,129
  • 1
  • 28
  • 49