---
title: "readAttributeCache(withController:nodeId:endpointId:clusterId:attributeId:completion:)"
framework: matter
role: symbol
role_heading: Instance Method
path: "matter/mtrdevicecontrollerserverprotocol/readattributecache(withcontroller:nodeid:endpointid:clusterid:attributeid:completion:)"
---

# readAttributeCache(withController:nodeId:endpointId:clusterId:attributeId:completion:)

## Declaration

```swift
func readAttributeCache(withController controller: Any?, nodeId: UInt64, endpointId: NSNumber?, clusterId: NSNumber?, attributeId: NSNumber?, completion: @escaping @Sendable (Any?, (any Error)?) -> Void)
```

```swift
func readAttributeCache(withController controller: Any?, nodeId: UInt64, endpointId: NSNumber?, clusterId: NSNumber?, attributeId: NSNumber?) async throws -> Any
```
