<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.4.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreVideo",
  "identifier" : "/documentation/CoreVideo/CVMetalBufferCache",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core Video"
    ],
    "preciseIdentifier" : "c:@T@CVMetalBufferCacheRef"
  },
  "title" : "CVMetalBufferCache"
}
-->

# CVMetalBufferCache

A cache used to create and manage Metal buffer objects.

```
class CVMetalBufferCache
```

## Overview

A Core Video Metal buffer cache creates and manages [`CVMetalBuffer`](/documentation/CoreVideo/CVMetalBuffer) buffers. You use a Metal buffer cache to directly read from or write to GPU-based Core Video image buffers in rendering, or for sharing data with Metal kernels.

## Topics

### Functions

[`CVMetalBufferCacheCreate(_:_:_:_:)`](/documentation/CoreVideo/CVMetalBufferCacheCreate(_:_:_:_:))

[`CVMetalBufferCacheCreateBufferFromImage(_:_:_:_:)`](/documentation/CoreVideo/CVMetalBufferCacheCreateBufferFromImage(_:_:_:_:))

[`CVMetalBufferCacheFlush(_:_:)`](/documentation/CoreVideo/CVMetalBufferCacheFlush(_:_:))

[`CVMetalBufferCacheGetTypeID()`](/documentation/CoreVideo/CVMetalBufferCacheGetTypeID())

[`CVMetalBufferGetBuffer(_:)`](/documentation/CoreVideo/CVMetalBufferGetBuffer(_:))

[`CVMetalBufferGetTypeID()`](/documentation/CoreVideo/CVMetalBufferGetTypeID())

### Data Types

[`CVMetalBuffer`](/documentation/CoreVideo/CVMetalBuffer)

### Constants

[`kCVMetalBufferCacheMaximumBufferAgeKey`](/documentation/CoreVideo/kCVMetalBufferCacheMaximumBufferAgeKey)



---

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)