---
title: "cacheNode(for:)"
framework: coredata
role: symbol
role_heading: Instance Method
path: "coredata/nsatomicstore/cachenode(for:)"
---

# cacheNode(for:)

Returns the cache node for a given managed object ID.

## Declaration

```swift
func cacheNode(for objectID: NSManagedObjectID) -> NSAtomicStoreCacheNode?
```

## Parameters

- `objectID`: A managed object ID.

## Return Value

Return Value The cache node for objectID.

## Discussion

Discussion This method is normally used by cache nodes to locate related cache nodes (by relationships).

## See Also

### Utility Methods

- [cacheNodes()](coredata/nsatomicstore/cachenodes().md)
- [referenceObject(for:)](coredata/nsatomicstore/referenceobject(for:).md)
