<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/URLSessionConfiguration/requestCachePolicy",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSURLSessionConfiguration(py)requestCachePolicy"
  },
  "title" : "requestCachePolicy"
}
-->

# requestCachePolicy

A predefined constant that determines when to return a response from the cache.

```
var requestCachePolicy: NSURLRequest.CachePolicy { get set }
```

## Discussion

This property determines the request caching policy used by tasks within sessions based on this configuration.

Set this property to one of the constants defined in [`NSURLRequest.CachePolicy`](/documentation/Foundation/NSURLRequest/CachePolicy-swift.enum) to specify whether the cache policy should depend on expiration dates and age, whether the cache should be disabled entirely, and whether the server should be contacted to determine if the content has changed since it was last requested.

The default value is [`NSURLRequest.CachePolicy.useProtocolCachePolicy`](/documentation/Foundation/NSURLRequest/CachePolicy-swift.enum/useProtocolCachePolicy).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)