# Haneke

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

Repository: https://github.com/Haneke/HanekeSwift
Canonical: https://ross.abutalabs.com/products/haneke
Language: Swift
License: Apache-2.0
License Family: permissive
Last push: 2020-11-15T01:09:13+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": 4467, "days_push": 2118, "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 5155, forks 580 (observed 2026-08-28T04:09:11.448290+00:00)

## What it is
Haneke is a lightweight generic cache library for iOS and tvOS written in Swift, with memory and LRU disk caching for UIImage, NSData, JSON, String, and custom types. It includes zero-config UIImageView/UIButton extensions with background image resizing and decompression optimized for table and collection view cell reuse.

## Use cases
- cache images from urls in an ios app
- add a memory and disk cache for  api responses
- load and resize images asynchronously in a uitableview
- cache arbitrary data like strings or nsdata on disk
- automatically evict cached data on memory warnings
- display appropriately sized images in a collection view without jank

## When to choose
- you need a simple, generic cache layer for an iOS or tvOS app
- you want zero-config image loading with automatic resizing for UIKit scroll views
- you prefer a lightweight library over a full image-loading framework

## When to avoid
- you need an actively maintained library with recent Swift concurrency support
- you are building for Android or non-Apple platforms
- you need advanced features like animated GIF decoding or SwiftUI-native views

## Facets
- artifact type: library
- maturity: maintenance
- function: caching, image-processing, http-client
- domain: mobile-development, image-processing
- platform: -
- tags: image-cache, lru-cache, disk-cache, memory-cache, uikit, tvos, ios, swift, mobile

## Member repositories
- Haneke/HanekeSwift (main) score 23
- Haneke/Haneke (mirror) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:11.448290+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-29T18:01:54.991050+00:00, confidence not recorded.
  - readme: https://github.com/Haneke/HanekeSwift (fetched 2026-08-28T04:09:11.448290+00:00, sha 9eb32c300e8d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
