# pinterest/PINCache

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

Repository: https://github.com/pinterest/PINCache
Canonical: https://ross.abutalabs.com/products/pincache
Language: Objective-C
License: Apache-2.0
License Family: permissive
Topics: carthage, cocoapods, objective-c, ios, cache
Last push: 2026-08-21T22:01:49+00:00

## Health v2 (maintenance only)
Score: 67/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 8, longevity 100
- inputs: {"age_days": 4207, "days_push": 12, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2689, forks 365 (observed 2026-08-28T04:07:10.883971+00:00)

## What it is
PINCache is a fast, thread-safe key/value object cache for iOS, tvOS, and macOS, forked from TMCache to eliminate deadlocking. It combines an in-memory cache (PINMemoryCache) with an on-disk cache (PINDiskCache) backed by GCD for safe parallel access from multiple threads.

## Use cases
- cache downloaded images offline in an iOS app
- persist expensive computation results between app launches
- avoid deadlocks when accessing a cache from multiple threads
- automatically clear cached objects on memory warnings
- trim disk cache by byte count or age limit
- store NSCoding-conforming objects in memory and on disk

## When to choose
- you need a battle-tested Objective-C/Swift cache for Apple platforms
- your app caches downloaded data or slow processing results
- you need thread-safe parallel cache access without deadlocks
- you want automatic memory-warning eviction plus configurable disk limits

## When to avoid
- you target non-Apple platforms
- you need a distributed or network-backed cache
- your objects don't conform to NSCoding
- you're building a new Swift-first project and prefer a pure Swift cache

## Facets
- artifact type: library
- maturity: stable
- function: caching
- domain: mobile-development, developer-tools, performance
- platform: cpp
- tags: objective-c, memory-cache, disk-cache, thread-safe, gcd, cocoapods, carthage, tvos, ios, macos, swift

## Member repositories
- pinterest/PINCache (main) score 67

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:10.883971+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:17:42.819911+00:00, confidence not recorded.
  - readme: https://github.com/pinterest/PINCache (fetched 2026-08-28T04:07:10.883971+00:00, sha 2b4c18590543)
- Data as of 2026-08-30T08:39:29.467469+00:00.
