data caching
Asked on 04/29/2025
1 search
Data caching is discussed in several sessions at WWDC 2024, particularly in the context of SwiftData and machine learning models.
-
SwiftData: In the session Create a custom data store with SwiftData, the Datastore protocol is highlighted as it defines the functionality needed for a store to be usable by the model context, including caching. This allows for efficient data retrieval and persistence, supporting features like migration, history tracking, and CloudKit sync.
-
Machine Learning with Core ML: The session Deploy machine learning and AI models on-device with Core ML discusses the use of a key-value (KV) cache to store key and value vectors for language models. This caching mechanism helps reduce overhead and improve inference efficiency by avoiding the recomputation of vectors, thus speeding up prediction times.
-
Machine Learning with Metal: In the session Accelerate machine learning with Metal, the use of a KV cache is also explored. The session explains how to update the cache in place using operations like
sliceupdate
, which optimizes memory usage and improves performance.
These sessions provide insights into how caching is implemented and optimized in different contexts, from data persistence in SwiftData to performance improvements in machine learning models.

Customize feature discovery with TipKit
Focused on feature discovery, the TipKit framework makes it easy to display tips in your app. Now you can group tips so features are discovered in the ideal order, make tips reusable with custom tip identifiers, match the look and feel to your app, and sync tips using CloudKit. Learn how you can use the latest advances in TipKit to help people discover everything your app has to offer.

Bring your machine learning and AI models to Apple silicon
Learn how to optimize your machine learning and AI models to leverage the power of Apple silicon. Review model conversion workflows to prepare your models for on-device deployment. Understand model compression techniques that are compatible with Apple silicon, and at what stages in your model deployment workflow you can apply them. We’ll also explore the tradeoffs between storage size, latency, power usage and accuracy.

Platforms State of the Union
Discover the newest advancements on Apple platforms.