Does NSURLSession calculate a response's freshness lifetime?

"HTTP/1.1 specification defines a "freshness lifetime" for a response if a "Last-Modified" is present.

http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.2.4


> Also, if the response does have a Last-Modified time, the heuristic expiration value SHOULD be no more than some fraction of the interval since that time. A typical setting of this fraction might be 10%.

> The calculation to determine if a response has expired is quite simple:

response_is_fresh = (freshness_lifetime > current_age)

Does NSURLSession support it? If so, can the modifier, i.e. 10%, be adjusted?

Answered by DTS Engineer in 130076022

Does NSURLSession support it?

Yes.

If so, can the modifier, i.e. 10%, be adjusted?

No. It always uses the 10% value recommended by the RFC.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
Accepted Answer

Does NSURLSession support it?

Yes.

If so, can the modifier, i.e. 10%, be adjusted?

No. It always uses the 10% value recommended by the RFC.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
Does NSURLSession calculate a response's freshness lifetime?
 
 
Q