2009-09-20 04:24:03 +08:00
|
|
|
/*
|
2009-09-22 01:34:32 +08:00
|
|
|
* This file is part of the SDWebImage package.
|
|
|
|
* (c) Olivier Poitrey <rs@dailymotion.com>
|
2009-09-20 04:24:03 +08:00
|
|
|
*
|
|
|
|
* 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>
|
2010-09-17 04:56:11 +08:00
|
|
|
#import "SDImageCacheDelegate.h"
|
2009-09-20 02:45:42 +08:00
|
|
|
|
2009-09-22 01:34:32 +08:00
|
|
|
@interface SDImageCache : NSObject
|
2009-09-20 02:45:42 +08:00
|
|
|
{
|
2010-10-10 07:13:44 +08:00
|
|
|
NSMutableDictionary *memCache;
|
2009-09-20 02:45:42 +08:00
|
|
|
NSString *diskCachePath;
|
2010-09-17 04:56:11 +08:00
|
|
|
NSOperationQueue *cacheInQueue, *cacheOutQueue;
|
2009-09-20 02:45:42 +08:00
|
|
|
}
|
|
|
|
|
2009-09-22 01:34:32 +08:00
|
|
|
+ (SDImageCache *)sharedImageCache;
|
2009-09-20 02:45:42 +08:00
|
|
|
- (void)storeImage:(UIImage *)image forKey:(NSString *)key;
|
|
|
|
- (void)storeImage:(UIImage *)image forKey:(NSString *)key toDisk:(BOOL)toDisk;
|
2010-08-29 08:56:47 +08:00
|
|
|
- (void)storeImage:(UIImage *)image imageData:(NSData *)data forKey:(NSString *)key toDisk:(BOOL)toDisk;
|
2009-09-20 02:45:42 +08:00
|
|
|
- (UIImage *)imageFromKey:(NSString *)key;
|
|
|
|
- (UIImage *)imageFromKey:(NSString *)key fromDisk:(BOOL)fromDisk;
|
2010-09-17 04:56:11 +08:00
|
|
|
- (void)queryDiskCacheForKey:(NSString *)key delegate:(id <SDImageCacheDelegate>)delegate userInfo:(NSDictionary *)info;
|
|
|
|
|
2009-09-20 02:45:42 +08:00
|
|
|
- (void)removeImageForKey:(NSString *)key;
|
|
|
|
- (void)clearMemory;
|
|
|
|
- (void)clearDisk;
|
|
|
|
- (void)cleanDisk;
|
|
|
|
|
|
|
|
@end
|