         
         guard let delegate = self.delegate else { return }
         
-        delegate.fetchDataFromNetwork(itemIdentifier: identifier, URL: url,parameters: parameters, successHandler: { (data) -> Void in
+        delegate.fetchDataFromNetwork(URL: url,parameters: parameters, successHandler: { (data) -> Void in
             successHandler?(data: data)
-            self.updateCache(itemIdentifier: identifier, data: data)
+            self.updateCache(itemIdentifier: url, data: data)
         }, failureHandler: { (error) -> Void in
             failureHandler?(error: error)
         })

    // MARK: - public methods
    // MARK: -
    // MARK: fetchData methods
    public func fetchData(itemIdentifier identifier:String?, URL url:String, parameters:Dictionary<String, String>?, cachePolicy:HYLNetworkCachePolicy, successHandler:((data:AnyObject?)->Void)?, failureHandler:((error:NSError)->Void)?){
        let identifier = identifier ?? url
        /* load cached data according to policy */
        if let cachedData = fetchCachedData(itemIdentifier: identifier), successHandler = successHandler where cachePolicy != .LoadWithoutCacheData {
            successHandler(data: cachedData)
            if cachePolicy == .ReturnCacheDataElseLoad {
                return

}

@objc public protocol HYLNetworkCachingDelegate:class {
    func fetchDataFromNetwork(URL url:String,parameters:Dictionary<String, String>?, successHandler:((data:AnyObject)->Void), failureHandler:((error:NSError)->Void))
}

@objc public class HYLNetworkCaching: NSObject {
