diff --git a/.gitignore b/.gitignore index e5b4929..6f4aa97 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ Example/Pods -Example/Podfile.lock \ No newline at end of file +Example/Podfile.lock +*.xcuserstate diff --git a/BeappCache/Classes/RxCacheManager.swift b/BeappCache/Classes/RxCacheManager.swift index 931956b..ddd7f26 100644 --- a/BeappCache/Classes/RxCacheManager.swift +++ b/BeappCache/Classes/RxCacheManager.swift @@ -36,7 +36,7 @@ open class RxCacheManager { return Disposables.create() } - .subscribeOn(ConcurrentDispatchQueueScheduler(qos: .background)) + .subscribe(on: ConcurrentDispatchQueueScheduler(qos: .background)) } func buildAsyncObservableCaching(asyncObservable: Single, key: String, customExpirySecond: TimeInterval?) -> Single> where T: Codable { diff --git a/BeappCache/Classes/Strategy/AsyncOrCacheStrategy.swift b/BeappCache/Classes/Strategy/AsyncOrCacheStrategy.swift index 5394010..fd5b447 100644 --- a/BeappCache/Classes/Strategy/AsyncOrCacheStrategy.swift +++ b/BeappCache/Classes/Strategy/AsyncOrCacheStrategy.swift @@ -13,7 +13,7 @@ class AsyncOrCacheStrategy: CacheStrategyProtocol { func getStrategyObservable(cacheObservable: Maybe>, asyncObservable: Single>) -> Observable> where T: Codable { return asyncObservable .asObservable() - .catchError({ (error) in + .catch({ (error) in print("[ERROR] \(error)") return cacheObservable.asObservable().ifEmpty(switchTo: Observable.error(error)) }) diff --git a/Example/BeappCache.xcodeproj/project.xcworkspace/xcuserdata/cederache.xcuserdatad/UserInterfaceState.xcuserstate b/Example/BeappCache.xcodeproj/project.xcworkspace/xcuserdata/cederache.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index b4df6d2..0000000 Binary files a/Example/BeappCache.xcodeproj/project.xcworkspace/xcuserdata/cederache.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/Example/BeappCache.xcworkspace/xcuserdata/cederache.xcuserdatad/UserInterfaceState.xcuserstate b/Example/BeappCache.xcworkspace/xcuserdata/cederache.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index 05eed74..0000000 Binary files a/Example/BeappCache.xcworkspace/xcuserdata/cederache.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ