CocoaPods trunk is moving to be read-only. Read more on the blog, there are 9 months to go.

CodableNSCache 0.0.2

CodableNSCache 0.0.2

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Nov 2017
SwiftSwift Version 3.2
SPMSupports SPM

Maintained by Hiroki Matsuo.



  • By
  • Hiroki Matsuo

CodableNSCache

Build Status
Languages
Carthage compatible
Cocoapods compatible
License

Simple Wrapper NSCache for Codable Protocol

struct Person:Codable {
    var name:String
    var address:String
}

let cache = CodableCache<Person>()
let person = Person(name: "hiroraba", address: "kyoto")
cache.setObject(obj: person, forKey: "example")
let p = cache.objectForKey(forKey: "example")
print(p?.name) => "hiroraba"

Requirements

  • iOS 8.0+
  • Swift3.2+

Installation

CocoaPods

platform :ios, '8.0'
use_frameworks!
pod 'CodableNSCache'

Carthage

Create a Cartfile that lists the framework and run carthage update. Follow the instructions to add $(SRCROOT)/Carthage/Build/iOS/CodableNSCache.framework to an iOS project.

github "hiroraba/CodableNSCache"

Manually

  1. Download and drop CodableNSCache.swift in your project.
  2. Congratulations!

Contribute

We would love you for the contribution, check the LICENSE file for more info.