---
title: evictsObjectsWithDiscardedContent
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nscache/evictsobjectswithdiscardedcontent
---

# evictsObjectsWithDiscardedContent

Whether the cache will automatically evict discardable-content objects whose content has been discarded.

## Declaration

```swift
var evictsObjectsWithDiscardedContent: Bool { get set }
```

## Discussion

Discussion If true, the cache will evict a discardable-content object after its content is discarded. If false, it will not. The default value is true.

## See Also

### Managing Discardable Content

- [NSDiscardableContent](foundation/nsdiscardablecontent.md)
