Swiftpack.co - Package - CodeEagle/CacheLeaf


CacheLeaf

iOS network middleware framework for handling request result cache, base on Alamofire

Swift Carthage Compatible GitHub license Build Status

Requirements

iOS 9.0+ / macOS 10.11+

Xcode 8.0+

Swift 3.0+

Dependencies

Alamofire 4.0.1+

Installation

###Carthage

github "CodeEagle/CacheLeaf"

Usage

  import CacheLeaf
	...
    let url = URL(string: "https://httpbin.org/")!
    let req = URLRequest(url: url)
    req.execute(cache: 0, ignoreExpires: true, log: true, canCache: { _ in return true }) { (resp) in
                print("😆",resp.value)
                e.fulfill()
            }
    // or
    let url = URL(string: "https://httpbin.org/")!
    url.execute(cache: 0, ignoreExpires: true, log: true, canCache: { _ in return true }) { (resp) in
                print("😆",resp.value)
                e.fulfill()
            }
	...

Donations

License

CacheLeaf is released under the MIT license. See LICENSE for details.

Github

link
Stars: 1
Help us keep the lights on

Dependencies

Used By

Total: 0