Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. iOS
  3. Carlos

Carlos

MITSwift1.2.1

A simple but flexible cache library for iOS and watchOS apps, written in Swift with a functional programming approach.

GitHubGitHub
636 stars33 forks0 contributors

What is Carlos?

Carlos is a Swift library for building custom cache layers in iOS and watchOS applications. It provides a composable, type-safe system for combining memory, disk, and network caching with transformations and conditional logic. It solves the problem of managing complex caching strategies with clean, functional code.

Target Audience

iOS and watchOS developers who need flexible, type-safe caching solutions beyond simple key-value stores, particularly those building apps with complex data fetching and caching requirements.

Value Proposition

Developers choose Carlos for its functional programming approach, which allows for highly composable and type-safe cache pipelines, reducing boilerplate and enabling advanced features like request pooling, conditional caching, and seamless transformations.

Overview

A simple but flexible cache

Use Cases

Best For

  • Building multi-level cache pipelines with memory, disk, and network layers
  • Implementing type-safe caching with custom key and value transformations
  • Reducing redundant network requests through request pooling
  • Creating conditional caching logic based on app settings or key properties
  • Handling batch data fetching with partial or complete success requirements
  • Managing cache behavior in response to system memory warnings

Not Ideal For

  • Projects needing a simple, out-of-the-box cache without custom pipeline assembly
  • Teams developing for iOS versions below 13 or watchOS below 6
  • Developers uncomfortable with Swift's type system and functional programming concepts
  • Apps where caching is minimal and could be handled by basic solutions like URLCache

Pros & Cons

Pros

Composable Architecture

Allows combining multiple cache levels like memory, disk, and network into pipelines with automatic fallback, enabling complex strategies as shown in the usage examples.

Type-Safe Transformations

Supports key and value transformations using OneWayTransformationBox and TwoWayTransformationBox, ensuring compile-time safety when integrating different cache types.

Efficient Request Handling

Implements request pooling to group concurrent requests for the same key, avoiding duplicate expensive operations like network fetches, as detailed in the pooling requests section.

Built-in Cache Levels

Includes ready-to-use memory, disk, network fetcher, and NSUserDefaults caches, speeding up initial setup for common caching needs.

Cons

Steep Learning Curve

Requires understanding of functional programming patterns like monoidal composition and Swift's type system, which can be daunting for developers not experienced with these concepts.

Platform Limitations

Only supports iOS 13+ and watchOS 6+ due to the migration to Combine, excluding apps that need to target older operating systems, as stated in the breaking changes section.

Complex Setup Overhead

Building custom cache pipelines involves multiple steps like key transformations and conditioning, which adds boilerplate compared to simpler caching libraries.

Frequently Asked Questions

Quick Stats

Stars636
Forks33
Contributors0
Open Issues2
Last commit2 years ago
CreatedSince 2015

Tags

#functional-programming#ios#memory-cache#caching#type-safe#cache#watchos#swift#disk-cache#apps

Built With

C
Combine
S
Swift

Included in

iOS51.7kSwift26.0k
Auto-fetched 19 hours ago

Related Projects

HanekeSwiftHanekeSwift

A lightweight generic cache for iOS written in Swift with extra love for images.

Stars5,157
Forks580
Last commit5 years ago
CacheCache

:package: Nothing but Cache.

Stars3,145
Forks356
Last commit10 months ago
DiskDisk

Easily persist structs, images, and data on iOS

Stars3,114
Forks172
Last commit1 year ago
PINCachePINCache

Fast, non-deadlocking parallel object cache for iOS, tvOS and OS X

Stars2,691
Forks365
Last commit7 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub