<!--
{
  "availability" : [
    "iOS: 3.0.0 -",
    "iPadOS: 3.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreData",
  "identifier" : "/documentation/CoreData/NSAtomicStore/cacheNode(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Data"
    ],
    "preciseIdentifier" : "c:objc(cs)NSAtomicStore(im)cacheNodeForObjectID:"
  },
  "title" : "cacheNode(for:)"
}
-->

# cacheNode(for:)

Returns the cache node for a given managed object ID.

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

## Parameters

`objectID`

A managed object ID.

## Return Value

The cache node for `objectID`.

## Discussion

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

---

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)