---
title: cachedResponse
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/urlprotocol/cachedresponse
---

# cachedResponse

The protocol’s cached response.

## Declaration

```swift
@NSCopying var cachedResponse: CachedURLResponse? { get }
```

## Discussion

Discussion If not overridden in a subclass, this method returns the cached response stored at initialization time.

## See Also

### Getting protocol attributes

- [client](foundation/urlprotocol/client.md)
- [URLProtocolClient](foundation/urlprotocolclient.md)
- [request](foundation/urlprotocol/request.md)
- [task](foundation/urlprotocol/task.md)
