Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Carlos 0.7

Compare
Choose a tag to compare
@vittoriom vittoriom released this 27 Mar 10:24
· 153 commits to master since this release

Breaking changes

  • onCompletion argument now is a closure accepting a Result<T> as a parameter instead of a tuple (value: T?, error: ErrorType?). Result<T> is the usual enum (aka Either) that can be .Success(T), .Error(ErrorType) or Cancelled in case of canceled computations.
  • Please add a import PiedPiper line everywhere you make use of Carlos' Futures or Promises, since with 0.7 we now ship a separate Pied Piper framework.
  • AsyncComputation has been removed from the public API. Please use OneWayTransformer (or CacheLevel) instead now.

Deprecated

  • APIs using closures instead of Fetcher, CacheLevel or OneWayTransformer parameters are now deprecated in favor of their counterparts. They will be removed from Carlos with the 1.0 release.

New features

  • It's now possible to batch a set of fetch requests. You can use batchGetAll if you want to pass a list of keys and get the success callback when all of them succeed and the failure callback as soon as one of them fails, or batchGetSome if you want to pass a list of keys and get the success callback when all of them completed (successfully or not) but only get the list of successful responses back.

Fixes

  • Correctly updates access date on the disk cache when calling set on a DiskCacheLevel