<!--
{
  "availability" : [
    "macOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "DiskImageKit",
  "identifier" : "/documentation/DiskImageKit/DiskImage/LayerType-swift.struct/cache",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "DiskImageKit"
    ],
    "preciseIdentifier" : "s:12DiskImageKit0aB0C9LayerTypeV5cacheAEvpZ"
  },
  "title" : "cache"
}
-->

# cache

A cache layer.

```
static let cache: DiskImage.LayerType
```

## Discussion

Cache layers store all the blocks read from the layers beneath it in the stack.
A cache layer is useful when the base image is on a network mount, for example.

---

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)