-
Notifications
You must be signed in to change notification settings - Fork 39
/
CacheManager.h
36 lines (27 loc) · 895 Bytes
/
CacheManager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//
// AvroKeyboard
//
// Created by Rifat Nabi on 7/1/12.
// Copyright (c) 2012 OmicronLab. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface CacheManager : NSObject {
NSMutableDictionary* _weightCache;
NSMutableDictionary* _phoneticCache;
NSMutableDictionary* _recentBaseCache;
}
+ (CacheManager *)sharedInstance;
- (void)persist;
// TODO - Rewrite the CacheManager with meaningful methods
// Weight Cache (default for String)
- (NSString*)stringForKey:(NSString*)aKey;
- (void)removeStringForKey:(NSString*)aKey;
- (void)setString:(NSString*)aString forKey:(NSString*)aKey;
// Phonetic Cahce (default for Array)
- (NSArray*)arrayForKey:(NSString*)aKey;
- (void)setArray:(NSArray*)anArray forKey:(NSString*)aKey;
// Base Cahce
- (void)removeAllBase;
- (NSArray*)baseForKey:(NSString*)aKey;
- (void)setBase:(NSArray*)aBase forKey:(NSString*)aKey;
@end