A typesafe key-value data cache for iOS, macOS, tvOS, and watchOS written in Swift.
Cachyr is a key-value data cache library for Apple platforms like iOS, macOS, tvOS, and watchOS, written in Swift. It solves the problem of efficiently storing and retrieving typed data with both memory and disk caching, ensuring type safety through generics and the DataConvertable protocol.
iOS, macOS, tvOS, and watchOS developers who need a lightweight, type-safe caching solution for their Swift applications.
Developers choose Cachyr for its clean, single-purpose design, type safety, and dual memory/disk caching capabilities, which are not all found together in other existing cache solutions.
A small key-value data cache for iOS, macOS and tvOS, written in Swift.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses generics and the DataConvertable protocol to ensure type-safe data storage and retrieval, reducing runtime errors and improving code reliability.
Supports both in-memory and persistent disk caching, allowing flexible data persistence across app sessions without relying on external solutions.
Simplifies handling cache misses with built-in methods to populate data asynchronously, streamlining data flow and reducing boilerplate code.
Focuses solely on caching with a straightforward, readable codebase, making it easy to understand, maintain, and integrate into Swift projects.
Uses serial dispatch queues for thread synchronization, which is less performant than concurrent patterns like multiple reader single writer, as acknowledged in the README's ToDo section.
The disk cache has no built-in size limit, potentially leading to unbounded disk usage if not managed externally, which could be problematic for storage-sensitive apps.
Only basic types like Data, String, Int, Float, and Double have default DataConvertable implementations; custom types require manual protocol implementation, adding overhead.