Haneke Versions Save

A lightweight zero-config image cache for iOS, in Objective-C.

v1.0.2

8 years ago

Minor bug fixes and project update to Xcode 7.2.

UIKit+Haneke

  • Bug fix: Don't animate with zero duration to prevent flicker in some scenarios. Thanks @dstancioff!
  • Increase default disk capacity for auto formats to 50MB. Thanks @sebbean!

Fetchers

  • Support 201 responses. Thanks @barbelith!

v1.0.1

9 years ago

Bug fixes related to cache invalidation.

HNKCache

  • Bug fix: setMemoryImage:forKey:format: with nil image didn't invalidate the key. Thanks @julianhirt!

HNKDiskCache

  • Bug fix: adding data after calling removeAllData failed. Thanks @despinoza!

v1.0.0

9 years ago

Haneke v1.0.0 is a major refactoring with improvements on all fronts and minor bug fixes.

Here's a changelog. For more info check out this blog post.

New components

  • UIButton+Haneke: UIButton category that reduces setting foreground or background images from network or disk to one line, like UIImageView+Haneke beforehand.
  • HNKNetwortFetcher and HNKDiskFetcher: classes that encapsulate fetching images from network and disk respectively, making it simpler to use Haneke from any layer of your app while also providing more extension points (e.g., HNKNetworkFetcher can be subclassed to use a custom URL session).
  • HNKDiskCache: standalone disk cache for any kind of data.
  • Haneke+AFNetworking: an official extension to use AFNetworking for image downloads.

API Changes

  • HNKCache: All asynchronous fetch operations are aptly named fetch* and accept success and failure blocks (instead of a single completion block).
  • UIImageView+Haneke: placeholderImage parameter has been renamed to placeholder for brevity.
  • UIImageView+Haneke: hnk_cancelImageRequest has been renamed to hnk_cancelSetImage.
  • HNKErrorDiskCacheMiss has been renamed to HNKErrorImageNotFound.
  • HNKCacheEntity has been renamed to HNKFetcher and the protocol has been changed to support asynchronous image fetching.

Bug fixes

  • Replacing an image in the cache didn't update the disk size properly.
  • Fixed documentation bugs.
  • Networks requests with error status code succeeded if the received data was a valid image. Thanks @quellish!

Code improvements

  • Added dozens of unit tests and increased test coverage to 99%.
  • UIKit categories use weak references for better performance. Thanks @damienrambout!
  • Stopped escaping spaces in disk cache file names. This makes debugging easier.

v0.1.2

9 years ago

Bug fix.

HNKCache

  • Fixes #33: Orientation metadata was lost in image decompression. In particular, this affected Camera photos taken with a rotated device. Thanks @Steven4294!

v0.1.1

9 years ago

Minor bug fixes, code refactoring and unit test improvements.

HNKCache

  • Fixes #23: disk caching failed if the key was too long due to using a escaped key as the disk image file name. If the escaped key is too long, Haneke now uses a MD5 hash. In any case, the key is now stored with the file as an extended file attribute (com.hpique.haneke.key).
  • Bug fix: only increase format disk size if image write is successful (5eff1680fba932637958d4debf615c1acc51bdaa).

UIImageView+Haneke

  • Bug fix: canceling a network request had a chance of canceling the next image request (588dc3a8192567032bf3c44f0db3be4d83530738).