Last active
December 17, 2015 08:18
-
-
Save jamiepinkham/5578594 to your computer and use it in GitHub Desktop.
a subscripted cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// JPSubscriptedCache.h | |
// | |
// | |
// Created by Jamie Pinkham on 5/14/13. | |
// | |
// | |
#import <UIKit/UIKit.h> | |
@interface JPSubscriptedCache : NSCache | |
- (id)objectForKeyedSubscript:(id)key; | |
- (void)setObject:(id)obj forKeyedSubscript:(id<NSCopying>)key; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// JPSubscriptedCache.m | |
// | |
// | |
// Created by Jamie Pinkham on 5/14/13. | |
// | |
// | |
#import "JPSubscriptedCache.h" | |
@implementation JPSubscriptedCache | |
- (id)objectForKeyedSubscript:(id)key | |
{ | |
[super objectForKey:key]; | |
} | |
- (void)setObject:(id)obj forKeyedSubscript:(id<NSCopying>)key | |
{ | |
[super setObject:obj forKey:key]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment