spotify/SPTPersistentCache
Everyone tries to implement a cache at some point in their iOS app’s lifecycle, and this is ours. observed · 2026-08-28
Health v2 · maintenance only
83/100
- Activity 92
- Release rhythm 61
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 3849
- days_rel: 49
- days_push: 49
- n_releases_24m: 1
Adoption not part of the score
1246 stars · 74 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
SPTPersistentCache is an Objective-C library from Spotify for caching NSData on disk with TTL values and LRU disk-management semantics. It stores each entry as a separate file with a cache header tracking TTL, access frequency, and corruption checks, plus scheduled garbage collection.
Use cases
- cache images on disk in an iOS app
- persist downloaded data with a time to live
- add an LRU disk cache to an iOS or macOS app
- limit how much disk space cached data uses
- cache remote files without blocking concurrent reads and writes
- inspect and strip cache headers from cached files
When to choose
- you need a battle-tested disk cache for NSData in an iOS or macOS app
- you want TTL-based expiry and automatic garbage collection of cached files
- you cache different data types and want separate per-type cache instances
When to avoid
- you need an in-memory-only cache
- your app targets platforms beyond iOS/macOS or uses Swift-only tooling without Objective-C interop
- you need encrypted or compressed caching
Facets
library · maturity maintenance
caching file-system mobile-development developer-tools objective-c lru-cache disk-cache ttl cocoapods garbage-collection ios macos
1 source
- readme: https://github.com/spotify/SPTPersistentCache · fetched 2026-08-28 · 085cbd8c185c
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| spotify/SPTPersistentCache | main | 83 |
For agents
markdown · JSON · MCP: product_card(name="spotify/SPTPersistentCache")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem