                     self.delegate.deleteCache(for: recordID)
                 case .token(let (zoneID, token)):
                     print("token: \(zoneID)->\(token)")
-                    
-                    if var tokenMap = self.defaults.object(forKey: Cache.zoneTokenMapKey) as? ZoneTokenMap {
-                        tokenMap[zoneID] = token
-                        self.defaults.set(tokenMap, forKey: Cache.zoneTokenMapKey)
-                    }
-                    
+                    self.save(zoneID: zoneID, token: token, for: Cache.zoneTokenMapKey)
                 }
                 
             case .error(let error):

import RxSwift
import CloudKit

typealias ZoneTokenMap = [CKRecordZoneID: CKServerChangeToken]

public protocol CacheDelegate {
    func cache(record: CKRecord)

            
            for recordZoneID in recordZoneIDs {
                
                if let token = tokenMap[self.key(zoneID: recordZoneID)] {
                    let options = CKFetchRecordZoneChangesOptions()
                    options.previousServerChangeToken = self.value(token: token)
                    optionsByRecordZoneID[recordZoneID] = options
                }
                
