 
 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 config: Config = Config()
  public class Config {
    public var maxCount : Int = 10
    public var maxByteSize  : Int = 3 * 1024 * 1024 //3MB
  }
  
  public func setConfig(config :Config) {

  
  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++ {
