Implements thread-safe data persistence layers in Swift using the actor model to eliminate data races via in-memory caching and file-backed storage.
This skill provides specialized guidance for building robust, thread-safe persistence layers in Swift 5.5+ applications. By leveraging the actor model, it eliminates the need for manual synchronization mechanisms like locks or dispatch queues, ensuring data safety at compile time. It implements a pattern that combines high-performance in-memory caching with durable, atomic file-backed storage, making it ideal for offline-first mobile apps and local data management in iOS and macOS environments.
주요 기능
010 GitHub stars
02Atomic file-backed storage to prevent data corruption
03Seamless integration with @Observable and modern SwiftUI ViewModels
04High-performance O(1) in-memory caching
05Compile-time thread safety using Swift actors
06Generic implementation supporting Codable and Identifiable types
사용 사례
01Building offline-first iOS or macOS applications with local data storage
02Replacing legacy lock-based synchronization with modern Swift concurrency patterns
03Managing shared mutable state across multiple concurrent threads safely