<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Network",
  "identifier" : "/documentation/Network/nw_privacy_context_flush_cache(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "c:@F@nw_privacy_context_flush_cache"
  },
  "title" : "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.

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

## Discussion

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)