HanekeSwift

Haneke is a lightweight generic cache for iOS and tvOS written in Swift 4. It’s designed to be super-simple to use.

Features:

  • Generic cache with out-of-the-box support for UIImage, NSData, JSON and String
  • First-level memory cache using NSCache
  • Second-level LRU disk cache using the file system
  • Asynchronous fetching of original values from network or disk
  • All disk access is performed in background
  • Thread-safe
  • Automatic cache eviction on memory warnings or disk capacity reached
  • Comprehensive unit tests
  • Extensible by defining custom formats, supporting additional types or implementing custom fetchers

For images:

  • Zero-config UIImageView and UIButton extensions to use the cache, optimized for UITableView and UICollectionView cell reuse
  • Background image resizing and decompression

Posted

in

,

by

Tags:

Comments

Leave a Reply