---
title: "urlProtocol(_:cachedResponseIsValid:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/urlprotocolclient/urlprotocol(_:cachedresponseisvalid:)"
---

# urlProtocol(_:cachedResponseIsValid:)

Tells the client that a cached response is valid.

## Declaration

```swift
func urlProtocol(_ protocol: URLProtocol, cachedResponseIsValid cachedResponse: CachedURLResponse)
```

## Parameters

- `protocol`: The URL protocol object sending the message.
- `cachedResponse`: The cached response whose validity is being communicated.
