---
title: URLCache.StoragePolicy
framework: foundation
role: symbol
role_heading: Enumeration
path: foundation/urlcache/storagepolicy
---

# URLCache.StoragePolicy

These constants specify the caching strategy used by an CachedURLResponse object.

## Declaration

```swift
enum StoragePolicy
```

## Topics

### Policies

- [URLCache.StoragePolicy.allowed](foundation/urlcache/storagepolicy/allowed.md)
- [URLCache.StoragePolicy.allowedInMemoryOnly](foundation/urlcache/storagepolicy/allowedinmemoryonly.md)
- [URLCache.StoragePolicy.notAllowed](foundation/urlcache/storagepolicy/notallowed.md)

### Initializers

- [init(rawValue:)](foundation/urlcache/storagepolicy/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
