---
title: flushCache()
framework: network
role: symbol
role_heading: Instance Method
path: network/nwparameters/privacycontext/flushcache()
---

# flushCache()

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

## Declaration

```swift
func flushCache()
```

## 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

- [init(description:)](network/nwparameters/privacycontext/init(description:).md)
- [default](network/nwparameters/privacycontext/default.md)
- [disableLogging()](network/nwparameters/privacycontext/disablelogging().md)
