Latest 0.0.2
Homepage https://github.com/hiroraba/CodableNSCache
License MIT
Platforms ios 8.0
Authors

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.

Latest podspec

{
    "name": "CodableNSCache",
    "version": "0.0.2",
    "summary": "Simple Wrapper NSCache for Codable Protocol",
    "homepage": "https://github.com/hiroraba/CodableNSCache",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Hiroki Matsuo": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/hiroraba/CodableNSCache.git",
        "tag": "0.0.2"
    },
    "source_files": "Sources/*.swift",
    "pushed_with_swift_version": "3.2"
}

Pin It on Pinterest

Share This