       }
     }
     return nil
-  }
-  
-  internal enum Result {
-    case Mishit, MemoryHit, DiskHit
   }
   
   internal func perform(url: NSURL) -> (UIImage?, Result) {

    dispatch_semaphore_signal(diskSemaphore)
  }
  
  public func allMemoryCacheDelete() {
    dispatch_semaphore_wait(memorySemaphore, DISPATCH_TIME_FOREVER)
    memoryCache.removeAll(keepCapacity: false)
    dispatch_semaphore_signal(memorySemaphore)
  }
  
  internal func download(url: NSURL) -> (UIImage, byteSize: Int)? {

    }
  }
  
  //util
  
  private var now: Double {
    get {
      return NSDate().timeIntervalSince1970
    }
  }
  
  private func folderCreate() {
    let path = "\(config.cacheRootDirectory)\(config.cacheFolderName)/"
    if fileManager.createDirectoryAtPath(
      path,
      withIntermediateDirectories: false,
      attributes: nil,
      error: nil){}
  }
  
  private class func filePath(url: NSURL, config:Config) -> String? {
    if let urlstr = url.absoluteString {
      var code = ""
      for char in urlstr.utf8 {
        code = code + "u\(char)"
      }
      return "\(config.cacheRootDirectory)\(config.cacheFolderName)/\(code)"
    }
    return nil
  }
  
  private class func folderPath(config: Config) -> String {
    return "\(config.cacheRootDirectory)\(config.cacheFolderName)/"
  }
  
  private func prefetchQueueInit(){
    prefetchQueue.maxConcurrentOperationCount = config.prefetchOprationCount
    prefetchQueue.qualityOfService = NSQualityOfService.Background
  }
  
}