---
title: cachePolicy
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nsmutableurlrequest/cachepolicy
---

# cachePolicy

The request’s cache policy.

## Declaration

```swift
var cachePolicy: NSURLRequest.CachePolicy { get set }
```

## Discussion

Discussion This property is ignored for requests used to construct URLSessionUploadTask and URLSessionDownloadTask objects, as caching is not supported by the URL Loading System for upload or download requests.

## See Also

### Working with a cache policy

- [NSURLRequest.CachePolicy](foundation/nsurlrequest/cachepolicy-swift.enum.md)
