kgn / KGNCache

Simple disk + memory cache with date expirations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KGNCache

KGNCache is a memory and file based cache. If the object exists on the file system it’s returned from there and added to the memory cache. KGNCache uses NSCache under the hood for the memory cache so will automatically clear out objects under memory pressure.

Release License

Build Status Carthage Compatible CocoaPods Version CocoaPods Platforms

Twitter Follow Star

Installing

Carthage

github "kgn/KGNCache"

CocoaPods

pod 'KGNCache'

Examples

let name = "Steve Jobs"

let cache = Cache(named: "names")
cache.setObject(name, forKey: "name")

cache.objectForKey(key) {
    print($0) // Steve Jobs
}

TODO:

  • Travis
  • Badges
  • Tests
  • Carthage
  • CocoaPods (Just need to publish)
  • Description (Add expiration example)
  • Documentation
  • AppleTV
  • AppleWatch
  • Prebuilt Frameworks
  • Travis Test Matrix

About

Simple disk + memory cache with date expirations

License:MIT License


Languages

Language:Swift 93.7%Language:Ruby 3.5%Language:Objective-C 2.9%