# aschuch/AwesomeCache

Delightful on-disk cache (written in Swift)

Repository: https://github.com/aschuch/AwesomeCache
Canonical: https://ross.abutalabs.com/products/awesomecache
Language: Swift
License: MIT
License Family: permissive
Topics: cache, swift, disk-cache, expiry
Last push: 2021-08-11T10:19:24+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4435, "days_push": 1848, "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 1266, forks 162 (observed 2026-08-28T04:04:11.252614+00:00)

## What it is
AwesomeCache is a Swift library providing a thread-safe on-disk cache for Apple platforms, backed by NSCache for fast in-memory access with automatic disk persistence. It supports per-object expiry (by seconds or date), expired-object cleanup, and a cacheBlock helper for caching async API responses.

## Use cases
- cache API responses on disk in an iOS app
- persistent disk cache for Swift objects with expiry
- store downloaded data locally with a TTL in Swift
- thread-safe in-memory plus disk cache for iOS
- cache-aside wrapper for async network calls in Swift

## When to choose
- You are building an iOS, watchOS, or tvOS app in Swift and need simple persistent caching with per-object expiration
- You want NSCache-backed memory performance with disk persistence as a fallback
- You want a small, sync API to cache results of async tasks such as network requests

## When to avoid
- You target non-Apple platforms such as Linux or Android, since it depends on NSCache and Apple frameworks
- You need an async or modern-Swift-first API, as the library was built around the Swift 3 era and its last release was in 2021
- You need large-scale or queryable storage, where a database or dedicated cache server is a better fit

## Facets
- artifact type: library
- maturity: maintenance
- function: caching, file-system
- domain: mobile-development, developer-tools
- platform: -
- tags: disk-cache, nscache, cache-expiry, thread-safe, cocoapods, carthage, watchos, tvos, ios-tools, ios, mobile, swift

## Member repositories
- aschuch/AwesomeCache (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:11.252614+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-30T05:03:46.177339+00:00, confidence not recorded.
  - readme: https://github.com/aschuch/AwesomeCache (fetched 2026-08-28T04:04:11.252614+00:00, sha 2d51a28139e6)
- Data as of 2026-08-30T08:39:29.467469+00:00.
