<!--
{
  "availability" : [
    "macOS: 10.3.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WebPreferences/cacheModel",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WebPreferences(py)cacheModel"
  },
  "title" : "cacheModel"
}
-->

# cacheModel

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

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

## Discussion

Possible values are described in [`WebCacheModel`](/documentation/WebKit/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`](/documentation/WebKit/WebCacheModel/documentViewer) constant instead.

---

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)