 
   func testItReturnsExpiredFileUrlsForDeletion() {
     let expectation = self.expectation(description: "Expired Urls")
-    cache = Cache(name: #function)
+    let cache = Cache(name: #function)
     cache.maxCacheAgeSeconds = 0
     let image = helper.image
     let key = #function
 
-    cache.store(image, forKey: key) { [cache] in
-      let urls = cache!.expiredFileUrls()
+    cache.store(image, forKey: key) {
+      let urls = cache.expiredFileUrls()
       XCTAssertFalse(urls.isEmpty)
       expectation.fulfill()
     }


  func testNamedCachesAreDistinct() {
    let expectation = self.expectation(description: "Retrieve image from cache")
    cache = Cache.default
    namedCache = Cache(name: "named")
    let image = helper.image
    let key = #function

    cache.store(image, forKey: key) { [namedCache] in
      namedCache?.retrieveImage(forKey: key, completion: { image, _ in
        XCTAssertNil(image)
        expectation.fulfill()
      })


  func testItClearsDiskCache() {
    let expectation = self.expectation(description: "Clear disk cache")
    let cache = Cache.default
    let image = helper.image
    let key = #function

    cache.store(image, forKey: key) {
      cache.clearMemory()
      cache.clearDisk {
        cache.retrieveImage(forKey: key) { image, _ in
          XCTAssertNil(image)
          expectation.fulfill()
        }
