Latest 0.1.2.1
Homepage https://github.com/nvkiet/FTWCache
License MIT
Platforms ios 8.0
Authors

Swift 2.1
Platforms iOS
License MIT

FTWCache is a small utility library to support caching data locally so we can pull them when we need them. The original repo is written in objective-c by @khanlou. So I want to port the code to swift 2 and support to install the library via CocoaPods.

Usage

FTWCache has two class methods for setting and retrieving data:

class func setObject(data: NSData, forKey key:String)

and

class func objectForKey(key: String) -> NSData?

and you can reset the cache with

class func resetCache()

It stores the files in your Caches folder in its own folder. The default expiration time is 7 days, but you can modify that if you need.

It takes NSData objects, so anything you can format in that way (audio files, images, simple text) can be store in the cache. Note also that the system will also periodically flush the Caches folders of apps if it finds it needs more space.

Installation

FTWCache is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "FTWCache"

Author

Kiet Nguyen – iOS blogger at http://vankiet.com/

License

FTWCache is released under the MIT license. See LICENSE.md

Latest podspec

{
    "name": "FTWCache",
    "version": "0.1.2.1",
    "summary": "Dead simple caching for Mac and iOS.",
    "homepage": "https://github.com/nvkiet/FTWCache",
    "license": "MIT",
    "authors": {
        "Kiet Nguyen": "[email protected]"
    },
    "social_media_url": "https://twitter.com/kietnv",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/nvkiet/FTWCache.git",
        "tag": "0.1.2.1"
    },
    "source_files": "FTWCache/*"
}

Pin It on Pinterest

Share This