 
 public extension WKInterfaceButton {
     
-    public func setCachedBackgroundImage(image : UIImage) -> String {
-        let imageData = UIImageJPEGRepresentation(image, 0.6)
-        return ImageCache.setCachedImageData(imageData, cachedBlock: { (key) -> Void in
-            self.setBackgroundImageNamed(key)
-        })
+    public func setCachedBackgroundImage(image : UIImage, compression : CGFloat = 0.6, cacheType : CacheType = DefaultCacheType) -> String {
+        return setCachedBackgroundImageData(UIImageJPEGRepresentation(image, compression), cacheType: cacheType)
     }
     
-    public func setCachedBackgroundImageData(imageData : NSData) -> String {
-        return ImageCache.setCachedImageData(imageData, cachedBlock: { (key) -> Void in
+    public func setCachedBackgroundImageData(imageData : NSData, cacheType : CacheType = DefaultCacheType) -> String {
+        return ImageCache.setCachedImageData(imageData, cacheType: cacheType, cachedBlock: { (key) -> Void in
             self.setBackgroundImageNamed(key)
         })
     }

import Foundation
import Darwin

public extension WKInterfaceImage {
    public func setCachedImage(image : UIImage) {
        let imageData = UIImageJPEGRepresentation(image, 0.6)
        ImageCache.setCachedImageData(imageData, cachedBlock: { (key) -> Void in
            self.setImageNamed(key)
        })
    }
    
    public func setCachedImageData(imageData : NSData) {
        ImageCache.setCachedImageData(imageData, cachedBlock: { (key) -> Void in
            self.setImageNamed(key)
        })
    }

        WKInterfaceDevice.currentDevice().removeCachedImageWithName(key)
    }
    
    private class func removeImageWithCacheStrategy(cacheType : CacheType) {
        if contains([.FIFO, .LRU], cacheType) {
            var imageName : String?
            var imageTimeStamp : NSTimeInterval = 0.0
            for (key, timestamp) in getTimeStamps() {
