NSURLRequest Cache Policy Documentation Inaccurate

Originator:daniel
Number:rdar://11541514 Date Originated:5/26/2012
Status:Open Resolved:
Product:Documentation Product Version:N/A
Classification:Other Bug Reproducible:N/A
 
Summary:
Although there is an extensive list of different cache policies listed in the documentation (https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSURLRequest_Class/Reference/Reference.html#//apple_ref/doc/c_ref/NSURLRequestUseProtocolCachePolicy), at least a few of these policies are not actually implemented, or actually do something different than suggested.

This is misleading and code result in unexpected results for applications.

Here's what's actually in NSURLRequest.h

enum
{
    NSURLRequestUseProtocolCachePolicy = 0,

    NSURLRequestReloadIgnoringLocalCacheData = 1,
    NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4, // Unimplemented
    NSURLRequestReloadIgnoringCacheData = NSURLRequestReloadIgnoringLocalCacheData,

    NSURLRequestReturnCacheDataElseLoad = 2,
    NSURLRequestReturnCacheDataDontLoad = 3,

    NSURLRequestReloadRevalidatingCacheData = 5, // Unimplemented
};
typedef NSUInteger NSURLRequestCachePolicy;

Steps to Reproduce:
N/A

Expected Results:
Documentation would indicate which policies are not implemented and which behaviors are different than described.

Actual Results:
Not the case.

Regression:
N/A

Notes:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!