<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIContextOption/cacheIntermediates",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Core Image",
      "CoreImage"
    ],
    "preciseIdentifier" : "c:@kCIContextCacheIntermediates"
  },
  "title" : "cacheIntermediates"
}
-->

# cacheIntermediates

A Boolean value to control how a Core Image context caches the contents of any intermediate image buffers it uses during rendering.

```
static let cacheIntermediates: CIContextOption
```

## Discussion

If a context caches intermediate buffers, then subsequent renders of a similar image using the same context
may be able to render faster. If a context does not cache intermediate buffers, then it may use less memory.

If the value for this option is:

- True: The context will cache intermediate results for future renders using the same context.
- False: The context will not cache intermediate results.
- Not specified: the default behavior True.

> Note:
> 
> - This option does affect how ``/CIImage/imageByInsertingIntermediate`` behaves.
> - This option does not affect how ``/CIImage/imageByInsertingIntermediate:`` behaves.

---

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)