Latest 0.0.1
Homepage https://github.com/TouTooNet/TTNCache
License MIT
Platforms ios 5.0, osx 10.7, requires ARC
Frameworks Foundation
Authors

A simple in-memory and in-disk cache for objective-c, You can customize for any object lifecycle

Installation

platform :ios, '6.0'
pod 'TTNCache'

Usage

Include Header File

#import "TTNCache.h"

Create TTNCache

TTNCache *cache = [[TTNCache alloc] initWithCacheDirectory:@"TTNCacheDirectory"];

Set Object

support all <NSCoding> object

- (void)setObject:(id<NSCoding>)obj forKeyedSubscript:(NSString *) key;
- (void)setObject:(id<NSCoding>)obj forKeyedSubscript:(NSString *) key block:(TTNCacheObjectBlock)block;
- (void)setObject:(id<NSCoding>)obj forKeyedSubscript:(NSString *) key andAgeLimit:(NSTimeInterval)ageLimit;
- (void)setObject:(id<NSCoding>)obj forKeyedSubscript:(NSString *) key andAgeLimit:(NSTimeInterval)ageLimit block:(TTNCacheObjectBlock)block;

Get Object

- (id) objectForKeyedSubscript:(NSString *) key;
- (void)objectForKeyedSubscript:(NSString *)key block:(TTNCacheObjectBlock)block;

Remove Object

- (void) removeObjectForSubscript:(NSString *) key;
- (void) removeObjectForSubscript:(NSString *) key block:(TTNCacheBlock)block;

Example

The repository includes a sample application
which shows all of the inter-app hooks in action.

License

TTNCache is released under the MIT license. See LICENSE for details.

Latest podspec

{
    "name": "TTNCache",
    "version": "0.0.1",
    "source_files": "TTNCache/*.{h,m}",
    "homepage": "https://github.com/TouTooNet/TTNCache",
    "summary": "Fast object cache for iOS and OS X.",
    "authors": {
        "SimMan": "[email protected]"
    },
    "source": {
        "git": "https://github.com/TouTooNet/TTNCache.git",
        "tag": "0.0.1"
    },
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "requires_arc": true,
    "frameworks": "Foundation",
    "ios": {
        "weak_frameworks": "UIKit"
    },
    "osx": {
        "weak_frameworks": "AppKit"
    },
    "platforms": {
        "ios": "5.0",
        "osx": "10.7"
    }
}

Pin It on Pinterest

Share This