---
title: "nw_privacy_context_flush_cache(_:)"
framework: network
role: symbol
role_heading: Function
path: "network/nw_privacy_context_flush_cache(_:)"
---

# nw_privacy_context_flush_cache(_:)

Flushes all cached data, such as TLS session state, created by connections associated with the privacy context.

## Declaration

```swift
func nw_privacy_context_flush_cache(_ privacy_context: nw_privacy_context_t)
```

## Discussion

Discussion Flushing the cache may be asynchronous, which means that it will take effect shortly after you invoke the function.

## See Also

### Configuring Custom Privacy Settings

- [nw_privacy_context_create(_:)](network/nw_privacy_context_create(_:).md)
- [nw_privacy_context_disable_logging(_:)](network/nw_privacy_context_disable_logging(_:).md)
