<!--
{
  "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/save()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Data"
    ],
    "preciseIdentifier" : "c:objc(cs)NSAtomicStore(im)save:"
  },
  "title" : "save()"
}
-->

# save()

Saves the cache nodes.

```
func save() throws
```

## Discussion

You override this method to make persistent the necessary information from the cache nodes to the URL specified for the receiver.

### Special Considerations

You must override this method.

## See Also

[`-  updateCacheNode:fromManagedObject:`](/documentation/CoreData/NSAtomicStore/updateCacheNode(_:from:))

Updates the given cache node using the values in a given managed object.

[`-  willRemoveCacheNodes:`](/documentation/CoreData/NSAtomicStore/willRemoveCacheNodes(_:))

Method invoked before the store removes the given collection of cache nodes.

[`-  newReferenceObjectForManagedObject:`](/documentation/CoreData/NSAtomicStore/newReferenceObject(for:))

Returns a new reference object for a given managed object.



---

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)