---
title: Cache
framework: swiftui
role: symbol
role_heading: Associated Type
path: swiftui/layout/cache
---

# Cache

Cached values associated with the layout instance.

## Declaration

```swift
associatedtype Cache = Void
```

## Discussion

Discussion If you create a cache for your custom layout, you can use a type alias to define this type as your data storage type. Alternatively, you can refer to the data storage type directly in all the places where you work with the cache. See makeCache(subviews:) for more information.

## See Also

### Managing a cache

- [makeCache(subviews:)](swiftui/layout/makecache(subviews:).md)
- [updateCache(_:subviews:)](swiftui/layout/updatecache(_:subviews:).md)
