Created
May 14, 2013 19:02
-
-
Save rustle/5578532 to your computer and use it in GitHub Desktop.
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
#pragma mark - Memory Cache Subscripting | |
// Allow self[key] for looking up and writing to memory cache | |
// This is mostly a novelty | |
- (id)objectForKeyedSubscript:(id)key | |
{ | |
return [self.memoryCache objectForKey:key]; | |
} | |
- (void)setObject:(id)obj forKeyedSubscript:(id)key | |
{ | |
[self.memoryCache setObject:obj forKey:key]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment