SwifteeCache 1.1.0

SwifteeCache 1.1.0

Maintained by Nikhil Sharma.



  • By
  • Name

SwifteeCache

Swift Version License CocoaPods Compatible
Platform

Simple on disk cache, backed by an NSCache in memory. It automatically purges itself when memory gets low.

NOTE: Data Model needs to implement 'Codable(Encodable&Decodable)' protocol to be saved on the cache.

Requirements

  • iOS 10.0+
  • Xcode 9

Installation

CocoaPods

You can use CocoaPods to install NKCache by adding it to your Podfile:

platform :ios, '9.0'
use_frameworks!
pod 'NKCache'

Manually

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

Usage

For adding/removing objects in cache:

func setObject<T:Codable>(_ object:T,forKey key:String)
func removeObjectForKey(_ key:String)
func removeAllObjects()

For fetching objects in cache:

func getObjectForKey<T:Codable>(_ key:String)->T?
func objectExistsForKey(_ key:String)->Bool

Contribute

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

Meta

Nikhil Sharma – @devilnikks[email protected]

Distributed under the MIT license. See LICENSE for more information.

https://github.com/nikksindia