<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLHeapDescriptor/cpuCacheMode",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(cs)MTLHeapDescriptor(py)cpuCacheMode"
  },
  "title" : "cpuCacheMode"
}
-->

# cpuCacheMode

The CPU cache behavior for any resources you allocate from the heaps you create with this descriptor.

```
var cpuCacheMode: MTLCPUCacheMode { get set }
```

## Discussion

This property’s default value is [`MTLCPUCacheMode.defaultCache`](/documentation/Metal/MTLCPUCacheMode/defaultCache).

The resources you allocate from a heap inherit that heap’s CPU cache mode.

---

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)