This repository has been archived by the owner on Aug 8, 2024. It is now read-only.
Carlos 0.7
Breaking changes
onCompletion
argument now is a closure accepting aResult<T>
as a parameter instead of a tuple(value: T?, error: ErrorType?)
.Result<T>
is the usualenum
(akaEither
) that can be.Success(T)
,.Error(ErrorType)
orCancelled
in case of canceled computations.- Please add a
import PiedPiper
line everywhere you make use of Carlos'Future
s orPromise
s, since with 0.7 we now ship a separatePied Piper
framework. AsyncComputation
has been removed from the public API. Please useOneWayTransformer
(orCacheLevel
) instead now.
Deprecated
- APIs using closures instead of
Fetcher
,CacheLevel
orOneWayTransformer
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, orbatchGetSome
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 aDiskCacheLevel