         
         waitForExpectations(timeout: 3, handler: nil)
     }
+
+    func testDiskImageCacheExtendingExpirationTask() {
+        let exp = expectation(description: #function)
+        let url = testURLs[0]
+        stub(url, data: testImageData)
+
+        let options: KingfisherOptionsInfo = [.memoryCacheExpiration(.expired),
+                                              .diskCacheExpiration(.seconds(1)),
+                                              .diskCacheAccessExtendingExpiration(.cacheTime)] // default option
+
+        imageView.kf.setImage(with: url, options: options) { result in
+            XCTAssertNotNil(result.value?.image)
+            XCTAssertTrue(result.value!.cacheType == .none)
+
+            delay(1, block: {
+                self.imageView.kf.setImage(with: url, options: options) { result in
+                    XCTAssertNotNil(result.value?.image)
+                    XCTAssertTrue(result.value!.cacheType == .disk)
+                    delay(1, block: {
+                        self.imageView.kf.setImage(with: url, options: options) { result in
+                            XCTAssertNotNil(result.value?.image)
+                            XCTAssertTrue(result.value!.cacheType == .disk)
+
+                            exp.fulfill()
+                        }
+                    })
+                }
+            })
+        }
+
+        waitForExpectations(timeout: 3, handler: nil)
+    }
+
+    func testDiskImageCacheNotExtendingExpirationTask() {
+        let exp = expectation(description: #function)
+        let url = testURLs[0]
+        stub(url, data: testImageData)
+
+        let options: KingfisherOptionsInfo = [.memoryCacheExpiration(.expired),
+                                              .diskCacheExpiration(.seconds(1)),
+                                              .diskCacheAccessExtendingExpiration(.none)]
+
+        imageView.kf.setImage(with: url, options: options) { result in
+            XCTAssertNotNil(result.value?.image)
+            XCTAssertTrue(result.value!.cacheType == .none)
+
+            delay(1, block: {
+                self.imageView.kf.setImage(with: url, options: options) { result in
+                    XCTAssertNotNil(result.value?.image)
+                    XCTAssertTrue(result.value!.cacheType == .disk)
+
+                        delay(1, block: {
+                            self.imageView.kf.setImage(with: url, options: options) { result in
+                                XCTAssertNotNil(result.value?.image)
+                                XCTAssertTrue(result.value!.cacheType == .none)
+
+                                exp.fulfill()
+                            }
+                        })
+                }
+            })
+        }
+
+        waitForExpectations(timeout: 3, handler: nil)
+    }
+
+
 }
 
 extension View: Placeholder {}

        waitForExpectations(timeout: 3, handler: nil)
    }
    
    func testImageCacheNotExtendingExpirationTask() {
        let exp = expectation(description: #function)
        let url = testURLs[0]
        stub(url, data: testImageData)

        waitForExpectations(timeout: 3, handler: nil)
    }
    
    func testMemoryImageCacheExtendingExpirationTask() {
        let exp = expectation(description: #function)
        let url = testURLs[0]
        stub(url, data: testImageData)
