     }
 
     public func removeAll() {
-        self.caches.removeAll(keepCapacity: true) // TODO: keepCapacity
+        self.caches.removeAll(keepCapacity: false)
     }
 }
 

        if index == nil {
            return
        }
        let cache = self.caches[index!]
        self.caches.removeAtIndex(index!)
        self.caches.insert(cache, atIndex: 0)
    }

    private func get(key :String, update :Bool) -> T? {
        var caches :Array<Cache<T>>? = nil
        caches = self.caches.filter { (cache :Cache<T>) -> Bool in
            key == cache.key
        }
        if caches != nil && caches!.count > 0 {
            if update {
                self.updateCacheIndex(caches![0].key)
            }
            return caches![0].value
        }
        return nil
    }

        }

        self.lock.lock()
        // validate existing
        if let index = self.getIndex(key) {
            self.updateCacheIndex(index)
            self.lock.unlock()
            return true
        }
