DMImageCache.h 774 B

123456789101112131415161718192021222324252627
  1. /*
  2. * This file is part of the DMWebImage package.
  3. * (c) Dailymotion - Olivier Poitrey <rs@dailymotion.com>
  4. *
  5. * For the full copyright and license information, please view the LICENSE
  6. * file that was distributed with this source code.
  7. */
  8. #import <Foundation/Foundation.h>
  9. @interface DMImageCache : NSObject
  10. {
  11. NSMutableDictionary *cache;
  12. NSString *diskCachePath;
  13. }
  14. + (DMImageCache *)sharedImageCache;
  15. - (void)storeImage:(UIImage *)image forKey:(NSString *)key;
  16. - (void)storeImage:(UIImage *)image forKey:(NSString *)key toDisk:(BOOL)toDisk;
  17. - (UIImage *)imageFromKey:(NSString *)key;
  18. - (UIImage *)imageFromKey:(NSString *)key fromDisk:(BOOL)fromDisk;
  19. - (void)removeImageForKey:(NSString *)key;
  20. - (void)clearMemory;
  21. - (void)clearDisk;
  22. - (void)cleanDisk;
  23. @end