---
title: cacheModel
framework: webkit
role: symbol
role_heading: Instance Property
path: webkit/webpreferences/cachemodel
---

# cacheModel

The cache model for the web views associated with the receiver.

## Declaration

```swift
var cacheModel: WebCacheModel { get set }
```

## Discussion

Discussion Possible values are described in WebCacheModel. Set this property to optimize WebKit’s cache footprint (on disk and in memory) to best fit the use of the web view. If a web view is used only for a single webpage, use the WebCacheModel.documentViewer constant instead.

## See Also

### Caching

- [usesPageCache](webkit/webpreferences/usespagecache.md)
