---
title: cache
framework: diskimagekit
role: symbol
role_heading: Type Property
path: diskimagekit/diskimage/layertype-swift.struct/cache
---

# cache

A cache layer.

## Declaration

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

## Discussion

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.
