The documentation says, I can do:
Return Value: The actual cached
response to store in the cache. The
delegate may return cachedResponse
unmodified, return a modified cached
response, or return nil if no cached
response should be stored for the
connection.
What happens when I return cachedResponse unmodified?
Why would I want to return a modified cached response? Examples?
If you do not modify the cachedResponse then it will be cached according to the policy in cachedResponse.storagePolicy and cachedResponse.response.
One reason you might want to override this is to prevent certain things from being cached. Say you are talking to some REST service that returns security sensitive data that you do not want to have stores in a disk cache on the iPhone. Then you could return a modified cachedResponse with the storagePolicy set to NSURLCacheStorageAllowedInMemoryOnly.
Are you just interested in how this works or do you have a problem that you think is related to caching?