---
title: NSCacheDelegate
framework: foundation
role: symbol
role_heading: Protocol
path: foundation/nscachedelegate
---

# NSCacheDelegate

The delegate of an NSCache object implements this protocol to perform specialized actions when an object is about to be evicted or removed from the cache.

## Declaration

```swift
protocol NSCacheDelegate : NSObjectProtocol
```

## Topics

### Responding to Object Eviction

- [cache(_:willEvictObject:)](foundation/nscachedelegate/cache(_:willevictobject:).md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Managing the Delegate

- [delegate](foundation/nscache/delegate.md)
