 
 public class PIImageCache {
   
-  public init() {}
+  private func myInit() {
+    folderCreate()
+  }
+  
+  public init() {
+    myInit()
+  }
   
   public init(config: Config) {
-    dispatch_semaphore_wait(memorySemaphore,DISPATCH_TIME_FOREVER)
-    self.config.maxCount = config.maxCount
-    self.config.maxByteSize = config.maxByteSize
+    myInit()
+    dispatch_semaphore_wait(memorySemaphore, DISPATCH_TIME_FOREVER)
+    self.config = config
     dispatch_semaphore_signal(memorySemaphore)
   }
   

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

    }
  }
  
  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)
