In my iOS app I'm using AFNetworking
library to send POST requests to the server. The server response headers contain cache-control → no-cache
. In my custom AFHTTPSessionManager
subclass I don't explicitly set the NSURLRequestCachePolicy
, so I think that the default NSURLRequestUseProtocolCachePolicy
is used. Apple documentation for NSURLRequestUseProtocolCachePolicy
says:
Specifies that the caching logic defined in the protocol implementation, if any, is used for a particular URL load request. This is the default policy for URL load requests. This policy is described further in the discussion below.
In my case the caching logic is cache-control → no-cache
so I don't understand why I have Cache.db
stored in iOS simulator Library Caches folder of my app.
Anyone could help me to understand?
The cache database is probably created as soon as the OS sets the size of the on-disk cache. Its existence does not imply that it is actually being used.