Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

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

TermsPrivacyAboutGitHubRSS
  1. Home
  2. iOS
  3. PINCache

PINCache

Apache-2.0Objective-C3.0.4

A fast, non-deadlocking parallel object cache for iOS, tvOS, watchOS, and macOS, designed to persist expensive-to-reproduce temporary objects.

GitHubGitHub
2.7k stars366 forks0 contributors

What is PINCache?

PINCache is a fast, non-deadlocking parallel object cache for Apple platforms (iOS, tvOS, watchOS, macOS) that stores temporary objects expensive to reproduce, like downloaded data or slow processing results. It combines an in-memory cache and a disk cache to provide flexible persistence while ensuring thread safety and preventing deadlocks in high-concurrency scenarios.

Target Audience

iOS, tvOS, watchOS, and macOS developers who need a reliable, high-performance caching solution for persisting data like images, API responses, or computed results in multi-threaded applications.

Value Proposition

Developers choose PINCache for its deadlock-free parallel access, two-tier storage architecture, and automatic memory management, making it a robust alternative to TMCache with improved reliability under heavy use.

Overview

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

Use Cases

Best For

  • Caching downloaded images or media in iOS apps
  • Storing API responses to reduce network calls
  • Persisting expensive computation results across app sessions
  • Managing temporary data in multi-threaded macOS applications
  • Handling memory warnings efficiently by auto-clearing cache
  • Implementing offline data persistence with disk backup

Not Ideal For

  • Cross-platform projects targeting Android, web, or other non-Apple ecosystems
  • Swift codebases heavily using value types without NSCoding conformance
  • Simple single-threaded apps where a lighter cache like NSCache suffices
  • Teams needing built-in network integration or advanced automatic eviction policies like LRU

Pros & Cons

Pros

Deadlock-Free Concurrency

Uses Grand Central Dispatch (GCD) to ensure safe parallel access from multiple threads, fixing deadlocking issues present in the original TMCache fork, as stated in the README.

Flexible Two-Tier Storage

Combines PINMemoryCache for fast in-memory access and PINDiskCache for persistent storage, allowing objects to be immediately available in memory while written to disk in the background, coordinating both caches efficiently.

Automatic iOS Memory Management

On iOS, the memory cache automatically clears itself on memory warnings or when the app backgrounds, helping prevent crashes and improve performance without manual intervention.

Broad NSCoding Support

Can store any object conforming to NSCoding, including collections like NSArray, with efficient archiving that avoids duplication on disk, as demonstrated in the README examples.

Cons

Platform Lock-In

Limited to Apple platforms (iOS, tvOS, watchOS, macOS), making it unsuitable for cross-platform development or server-side use, as noted in the requirements section.

NSCoding Dependency

Requires objects to conform to NSCoding, which can be cumbersome in modern Swift code where NSCoding isn't always implemented, especially for Swift value types that need casting to NS types.

Manual Cache Management

Disk cache trimming requires manual configuration of byte or age limits; lacks sophisticated automatic eviction policies like LRU out of the box, relying on developer setup.

Frequently Asked Questions

Quick Stats

Stars2,688
Forks366
Contributors0
Open Issues22
Last commit3 days ago
CreatedSince 2015

Tags

#parallel-computing#ios#memory-cache#caching#objective-c#tvos#cache#watchos#cocoapods#swift#carthage#disk-cache#macos

Built With

G
GCD

Included in

iOS51.7k
Auto-fetched 9 hours ago

Related Projects

HanekeSwiftHanekeSwift

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

Stars5,155
Forks580
Last commit5 years ago
CacheCache

:package: Nothing but Cache.

Stars3,143
Forks355
Last commit1 year ago
DiskDisk

Easily persist structs, images, and data on iOS

Stars3,113
Forks172
Last commit2 years ago
YYCacheYYCache

High performance cache framework for iOS.

Stars2,393
Forks549
Last commit3 years 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