   
   private var memoryCache : [memoryCacheImage] = []
   private var memorySemaphore = dispatch_semaphore_create(1)
+  private let fileManager = NSFileManager.defaultManager()
   
   private func memoryCacheRead(url: NSURL) -> UIImage? {
     for var i=0; i<memoryCache.count; i++ {

    struct Static {
      static let instance: PIImageCache = PIImageCache()
    }
    return Static.instance
  }
 

    }
  }
  
  private func folderCreate() {
    let path = "\(config.cacheRootDirectory)\(config.cacheFolderName)/"
    if fileManager.createDirectoryAtPath(
      path,
      withIntermediateDirectories: false,
      attributes: nil,
      error: nil){}
  }
  
  internal func download(url: NSURL) -> (UIImage, byteSize: Int)? {
    var err: NSError?
    var maybeImageData = NSData(contentsOfURL: url, options:.UncachedRead, error: &err)
