2009-09-20 04:24:03 +08:00
|
|
|
/*
|
|
|
|
* This file is part of the DMWebImage package.
|
|
|
|
* (c) Dailymotion - Olivier Poitrey <rs@dailymotion.com>
|
|
|
|
*
|
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
* file that was distributed with this source code.
|
|
|
|
*/
|
2009-09-20 02:45:42 +08:00
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
|
|
|
|
@interface DMImageCache : NSObject
|
|
|
|
{
|
2009-09-21 09:38:30 +08:00
|
|
|
NSMutableDictionary *memCache;
|
2009-09-20 02:45:42 +08:00
|
|
|
NSString *diskCachePath;
|
2009-09-21 09:38:30 +08:00
|
|
|
NSOperationQueue *cacheInQueue;
|
2009-09-20 02:45:42 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
+ (DMImageCache *)sharedImageCache;
|
|
|
|
- (void)storeImage:(UIImage *)image forKey:(NSString *)key;
|
|
|
|
- (void)storeImage:(UIImage *)image forKey:(NSString *)key toDisk:(BOOL)toDisk;
|
|
|
|
- (UIImage *)imageFromKey:(NSString *)key;
|
|
|
|
- (UIImage *)imageFromKey:(NSString *)key fromDisk:(BOOL)fromDisk;
|
|
|
|
- (void)removeImageForKey:(NSString *)key;
|
|
|
|
- (void)clearMemory;
|
|
|
|
- (void)clearDisk;
|
|
|
|
- (void)cleanDisk;
|
|
|
|
|
|
|
|
@end
|