Sfoglia il codice sorgente

Merge branch 'master' into swift4

onevcat 8 anni fa
parent
commit
72094047bc

+ 3 - 0
.github/ISSUE_TEMPLATE.md

@@ -20,3 +20,6 @@ Thanks for considering to open an issue. Before you submit your issue, please co
 
 [Add anything else here]
 
+
+<!-- Love Kingfisher? Please consider supporting our collective:
+👉  https://opencollective.com/Kingfisher/donate -->

+ 8 - 0
CHANGELOG.md

@@ -2,6 +2,14 @@
 
 -----
 
+## [3.10.2 - Missing Boys](https://github.com/onevcat/Kingfisher/releases/tag/3.10.2) (2017-06-16)
+
+#### Fix
+* Now the processed images result from a cache original image could be cached correctly. [#711](https://github.com/onevcat/Kingfisher/issues/711)
+* Some internal minor clean up.
+
+---
+
 ## [3.10.1 - Order, order!](https://github.com/onevcat/Kingfisher/releases/tag/3.10.1) (2017-06-04)
 
 #### Fix

+ 67 - 0
CONTRIBUTING.md

@@ -0,0 +1,67 @@
+# Contribute
+
+## Introduction
+
+First, thank you for considering contributing to Kingfisher! It's people like you that make the open source community such a great community! 😊
+
+We welcome any type of contribution, not only code. You can help with 
+- **QA**: file bug reports, the more details you can give the better (e.g. screenshots with the console open)
+- **Marketing**: writing blog posts, howto's, printing stickers, ...
+- **Community**: presenting the project at meetups, organizing a dedicated meetup for the local community, ...
+- **Code**: take a look at the [open issues](issues). Even if you can't write code, commenting on them, showing that you care about a given issue matters. It helps us triage them.
+- **Money**: we welcome financial contributions in full transparency on our [open collective](https://opencollective.com/Kingfisher).
+
+## Your First Contribution
+
+Working on your first Pull Request? You can learn how from this *free* series, [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github).
+
+## Submitting code
+
+Any code change should be submitted as a pull request. The description should explain what the code does and give steps to execute it. The pull request should also contain tests.
+
+## Code review process
+
+The bigger the pull request, the longer it will take to review and merge. Try to break down large pull requests in smaller chunks that are easier to review and merge.
+It is also always helpful to have some context for your pull request. What was the purpose? Why does it matter to you?
+
+## Financial contributions
+
+We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/Kingfisher).
+Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.
+
+## Questions
+
+If you have any questions, create an [issue](issue) (protip: do a quick search first to see if someone else didn't ask the same question before!).
+You can also reach us at hello@Kingfisher.opencollective.com.
+
+## Credits
+
+### Contributors
+
+Thank you to all the people who have already contributed to Kingfisher!
+<a href="graphs/contributors"><img src="https://opencollective.com/Kingfisher/contributors.svg?width=890" /></a>
+
+
+### Backers
+
+Thank you to all our backers! [[Become a backer](https://opencollective.com/Kingfisher#backer)]
+
+<a href="https://opencollective.com/Kingfisher#backers" target="_blank"><img src="https://opencollective.com/Kingfisher/backers.svg?width=890"></a>
+
+
+### Sponsors
+
+Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/Kingfisher#sponsor))
+
+<a href="https://opencollective.com/Kingfisher/sponsor/0/website" target="_blank"><img src="https://opencollective.com/Kingfisher/sponsor/0/avatar.svg"></a>
+<a href="https://opencollective.com/Kingfisher/sponsor/1/website" target="_blank"><img src="https://opencollective.com/Kingfisher/sponsor/1/avatar.svg"></a>
+<a href="https://opencollective.com/Kingfisher/sponsor/2/website" target="_blank"><img src="https://opencollective.com/Kingfisher/sponsor/2/avatar.svg"></a>
+<a href="https://opencollective.com/Kingfisher/sponsor/3/website" target="_blank"><img src="https://opencollective.com/Kingfisher/sponsor/3/avatar.svg"></a>
+<a href="https://opencollective.com/Kingfisher/sponsor/4/website" target="_blank"><img src="https://opencollective.com/Kingfisher/sponsor/4/avatar.svg"></a>
+<a href="https://opencollective.com/Kingfisher/sponsor/5/website" target="_blank"><img src="https://opencollective.com/Kingfisher/sponsor/5/avatar.svg"></a>
+<a href="https://opencollective.com/Kingfisher/sponsor/6/website" target="_blank"><img src="https://opencollective.com/Kingfisher/sponsor/6/avatar.svg"></a>
+<a href="https://opencollective.com/Kingfisher/sponsor/7/website" target="_blank"><img src="https://opencollective.com/Kingfisher/sponsor/7/avatar.svg"></a>
+<a href="https://opencollective.com/Kingfisher/sponsor/8/website" target="_blank"><img src="https://opencollective.com/Kingfisher/sponsor/8/avatar.svg"></a>
+<a href="https://opencollective.com/Kingfisher/sponsor/9/website" target="_blank"><img src="https://opencollective.com/Kingfisher/sponsor/9/avatar.svg"></a>
+
+<!-- This `CONTRIBUTING.md` is based on @nayafia's template https://github.com/nayafia/contributing-template -->

+ 2 - 2
Demo/Kingfisher-Demo/Info.plist

@@ -15,11 +15,11 @@
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>3.10.1</string>
+	<string>3.10.2</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>1066</string>
+	<string>1074</string>
 	<key>LSRequiresIPhoneOS</key>
 	<true/>
 	<key>UILaunchStoryboardName</key>

+ 2 - 2
Demo/Kingfisher-macOS-Demo/Info.plist

@@ -17,11 +17,11 @@
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>3.10.1</string>
+	<string>3.10.2</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>1066</string>
+	<string>1074</string>
 	<key>LSMinimumSystemVersion</key>
 	<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
 	<key>NSHumanReadableCopyright</key>

+ 2 - 2
Demo/Kingfisher-tvOS-Demo/Info.plist

@@ -15,11 +15,11 @@
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>3.10.1</string>
+	<string>3.10.2</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>1066</string>
+	<string>1074</string>
 	<key>LSRequiresIPhoneOS</key>
 	<true/>
 	<key>UIMainStoryboardFile</key>

+ 2 - 2
Demo/Kingfisher-watchOS-Demo Extension/Info.plist

@@ -17,11 +17,11 @@
 	<key>CFBundlePackageType</key>
 	<string>XPC!</string>
 	<key>CFBundleShortVersionString</key>
-	<string>3.10.1</string>
+	<string>3.10.2</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>1066</string>
+	<string>1074</string>
 	<key>NSExtension</key>
 	<dict>
 		<key>NSExtensionAttributes</key>

+ 2 - 2
Demo/Kingfisher-watchOS-Demo/Info.plist

@@ -17,11 +17,11 @@
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>3.10.1</string>
+	<string>3.10.2</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>1066</string>
+	<string>1074</string>
 	<key>UISupportedInterfaceOrientations</key>
 	<array>
 		<string>UIInterfaceOrientationPortrait</string>

+ 1 - 1
Kingfisher.podspec

@@ -1,7 +1,7 @@
 Pod::Spec.new do |s|
 
   s.name         = "Kingfisher"
-  s.version      = "3.10.1"
+  s.version      = "3.10.2"
   s.summary      = "A lightweight and pure Swift implemented library for downloading and cacheing image from the web."
 
   s.description  = <<-DESC

+ 16 - 16
Kingfisher.xcodeproj/project.pbxproj

@@ -2388,11 +2388,11 @@
 				APPLICATION_EXTENSION_API_ONLY = YES;
 				CODE_SIGN_IDENTITY = "";
 				COMBINE_HIDPI_IMAGES = YES;
-				CURRENT_PROJECT_VERSION = 1066;
+				CURRENT_PROJECT_VERSION = 1074;
 				DEBUG_INFORMATION_FORMAT = dwarf;
 				DEFINES_MODULE = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 1066;
+				DYLIB_CURRENT_VERSION = 1074;
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
 				FRAMEWORK_VERSION = A;
 				GCC_NO_COMMON_BLOCKS = YES;
@@ -2417,11 +2417,11 @@
 				APPLICATION_EXTENSION_API_ONLY = YES;
 				CODE_SIGN_IDENTITY = "";
 				COMBINE_HIDPI_IMAGES = YES;
-				CURRENT_PROJECT_VERSION = 1066;
+				CURRENT_PROJECT_VERSION = 1074;
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				DEFINES_MODULE = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 1066;
+				DYLIB_CURRENT_VERSION = 1074;
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
 				FRAMEWORK_VERSION = A;
 				GCC_NO_COMMON_BLOCKS = YES;
@@ -2608,11 +2608,11 @@
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
-				CURRENT_PROJECT_VERSION = 1066;
+				CURRENT_PROJECT_VERSION = 1074;
 				DEBUG_INFORMATION_FORMAT = dwarf;
 				DEFINES_MODULE = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 1066;
+				DYLIB_CURRENT_VERSION = 1074;
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
 				GCC_NO_COMMON_BLOCKS = YES;
 				INFOPLIST_FILE = Sources/Info.plist;
@@ -2639,11 +2639,11 @@
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
-				CURRENT_PROJECT_VERSION = 1066;
+				CURRENT_PROJECT_VERSION = 1074;
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				DEFINES_MODULE = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 1066;
+				DYLIB_CURRENT_VERSION = 1074;
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
 				GCC_NO_COMMON_BLOCKS = YES;
 				INFOPLIST_FILE = Sources/Info.plist;
@@ -2668,11 +2668,11 @@
 			buildSettings = {
 				APPLICATION_EXTENSION_API_ONLY = YES;
 				"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
-				CURRENT_PROJECT_VERSION = 1066;
+				CURRENT_PROJECT_VERSION = 1074;
 				DEBUG_INFORMATION_FORMAT = dwarf;
 				DEFINES_MODULE = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 1066;
+				DYLIB_CURRENT_VERSION = 1074;
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
 				GCC_NO_COMMON_BLOCKS = YES;
 				INFOPLIST_FILE = Sources/Info.plist;
@@ -2696,11 +2696,11 @@
 			buildSettings = {
 				APPLICATION_EXTENSION_API_ONLY = YES;
 				"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
-				CURRENT_PROJECT_VERSION = 1066;
+				CURRENT_PROJECT_VERSION = 1074;
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				DEFINES_MODULE = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 1066;
+				DYLIB_CURRENT_VERSION = 1074;
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
 				GCC_NO_COMMON_BLOCKS = YES;
 				INFOPLIST_FILE = Sources/Info.plist;
@@ -2942,10 +2942,10 @@
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
-				CURRENT_PROJECT_VERSION = 1066;
+				CURRENT_PROJECT_VERSION = 1074;
 				DEFINES_MODULE = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 1066;
+				DYLIB_CURRENT_VERSION = 1074;
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
 				INFOPLIST_FILE = Sources/Info.plist;
 				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
@@ -2969,10 +2969,10 @@
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
-				CURRENT_PROJECT_VERSION = 1066;
+				CURRENT_PROJECT_VERSION = 1074;
 				DEFINES_MODULE = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 1066;
+				DYLIB_CURRENT_VERSION = 1074;
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
 				INFOPLIST_FILE = Sources/Info.plist;
 				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";

+ 32 - 2
README.md

@@ -7,12 +7,12 @@
 <p align="center">
 <a href="https://travis-ci.org/onevcat/Kingfisher"><img src="https://img.shields.io/travis/onevcat/Kingfisher/master.svg"></a>
 <a href="https://github.com/Carthage/Carthage/"><img src="https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat"></a>
-<a href="https://swift.org/package-manager/"><img src="https://img.shields.io/badge/SPM-ready-orange.svg"></a>
 <a href="http://onevcat.github.io/Kingfisher/"><img src="https://img.shields.io/cocoapods/v/Kingfisher.svg?style=flat"></a>
 <a href="https://raw.githubusercontent.com/onevcat/Kingfisher/master/LICENSE"><img src="https://img.shields.io/cocoapods/l/Kingfisher.svg?style=flat"></a>
 <a href="http://onevcat.github.io/Kingfisher/"><img src="https://img.shields.io/cocoapods/p/Kingfisher.svg?style=flat"></a>
 <a href="https://codebeat.co/projects/github-com-onevcat-kingfisher"><img alt="codebeat badge" src="https://codebeat.co/assets/svg/badges/A-398b39-669406e9e1b136187b91af587d4092b0160370f271f66a651f444b990c2730e9.svg" /></a>
-<img src="https://img.shields.io/badge/made%20with-%3C3-orange.svg">
+<a href="#backers" alt="sponsors on Open Collective"><img src="https://opencollective.com/Kingfisher/backers/badge.svg" /></a>
+<a href="#sponsors" alt="Sponsors on Open Collective"><img src="https://opencollective.com/Kingfisher/sponsors/badge.svg" /></a>
 </p>
 
 Kingfisher is a lightweight, pure-Swift library for downloading and caching images from the web. This project is heavily inspired by the popular [SDWebImage](https://github.com/rs/SDWebImage). It provides you a chance to use a pure-Swift alternative in your next app.
@@ -75,6 +75,36 @@ The logo of Kingfisher is inspired by [Tangram (七巧板)](http://en.wikipedia.
 
 Follow and contact me on [Twitter](http://twitter.com/onevcat) or [Sina Weibo](http://weibo.com/onevcat). If you find an issue, just [open a ticket](https://github.com/onevcat/Kingfisher/issues/new). Pull requests are warmly welcome as well.
 
+## Contributors
+
+This project exists thanks to all the people who contribute. [[Contribute]](blob/master/CONTRIBUTING.md).
+<a href="graphs/contributors"><img src="https://opencollective.com/Kingfisher/contributors.svg?width=890" /></a>
+
+
+## Backers
+
+Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/Kingfisher#backer)]
+
+<a href="https://opencollective.com/Kingfisher#backers" target="_blank"><img src="https://opencollective.com/Kingfisher/backers.svg?width=890"></a>
+
+
+## Sponsors
+
+Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/Kingfisher#sponsor)]
+
+<a href="https://opencollective.com/Kingfisher/sponsor/0/website" target="_blank"><img src="https://opencollective.com/Kingfisher/sponsor/0/avatar.svg"></a>
+<a href="https://opencollective.com/Kingfisher/sponsor/1/website" target="_blank"><img src="https://opencollective.com/Kingfisher/sponsor/1/avatar.svg"></a>
+<a href="https://opencollective.com/Kingfisher/sponsor/2/website" target="_blank"><img src="https://opencollective.com/Kingfisher/sponsor/2/avatar.svg"></a>
+<a href="https://opencollective.com/Kingfisher/sponsor/3/website" target="_blank"><img src="https://opencollective.com/Kingfisher/sponsor/3/avatar.svg"></a>
+<a href="https://opencollective.com/Kingfisher/sponsor/4/website" target="_blank"><img src="https://opencollective.com/Kingfisher/sponsor/4/avatar.svg"></a>
+<a href="https://opencollective.com/Kingfisher/sponsor/5/website" target="_blank"><img src="https://opencollective.com/Kingfisher/sponsor/5/avatar.svg"></a>
+<a href="https://opencollective.com/Kingfisher/sponsor/6/website" target="_blank"><img src="https://opencollective.com/Kingfisher/sponsor/6/avatar.svg"></a>
+<a href="https://opencollective.com/Kingfisher/sponsor/7/website" target="_blank"><img src="https://opencollective.com/Kingfisher/sponsor/7/avatar.svg"></a>
+<a href="https://opencollective.com/Kingfisher/sponsor/8/website" target="_blank"><img src="https://opencollective.com/Kingfisher/sponsor/8/avatar.svg"></a>
+<a href="https://opencollective.com/Kingfisher/sponsor/9/website" target="_blank"><img src="https://opencollective.com/Kingfisher/sponsor/9/avatar.svg"></a>
+
+
+
 ### License
 
 Kingfisher is released under the MIT license. See LICENSE for details.

+ 1 - 1
Sources/AnimatedImageView.swift

@@ -208,7 +208,7 @@ class Animator {
     fileprivate var timeSinceLastFrameChange: TimeInterval = 0.0
     fileprivate var needsPrescaling = true
     
-    /// Loop count of animatd image.
+    /// Loop count of animated image.
     private var loopCount = 0
     
     var currentFrame: UIImage? {

+ 1 - 1
Sources/Image.swift

@@ -631,7 +631,7 @@ extension Kingfisher where Base: Image {
             assertionFailure("[Kingfisher] Decoding only works for CG-based image.")
             return base
         }
-        let colorSpace = CGColorSpaceCreateDeviceRGB()
+        
         guard let context = beginContext(size: CGSize(width: imageRef.width, height: imageRef.height)) else {
             assertionFailure("[Kingfisher] Decoding fails to create a valid context.")
             return base

+ 2 - 2
Sources/Info.plist

@@ -15,11 +15,11 @@
 	<key>CFBundlePackageType</key>
 	<string>FMWK</string>
 	<key>CFBundleShortVersionString</key>
-	<string>3.10.1</string>
+	<string>3.10.2</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>1066</string>
+	<string>1074</string>
 	<key>NSPrincipalClass</key>
 	<string></string>
 </dict>

+ 29 - 13
Sources/KingfisherManager.swift

@@ -226,29 +226,45 @@ public class KingfisherManager {
         }
         
         let targetCache = options.targetCache
+        // First, try to get the exactly image from cache
         targetCache.retrieveImage(forKey: key, options: options) { image, cacheType in
+            // If found, we could finish now.
             if image != nil {
                 diskTaskCompletionHandler(image, nil, cacheType, url)
                 return
             }
             
+            // If not found, and we are using a default processor, download it!
             let processor = options.processor
-            if processor != DefaultImageProcessor.default {
-                let optionsWithoutProcessor = options.removeAllMatchesIgnoringAssociatedValue(.processor(processor))
-                targetCache.retrieveImage(forKey: key, options: optionsWithoutProcessor) { image, cacheType in
-                    guard let image = image else {
-                        handleNoCache()
-                        return
-                    }
-                    
-                    let processedImage = processor.process(item: .image(image), options: options)
-                    diskTaskCompletionHandler(processedImage, nil, .none, url)
-                    return
-                }
+            guard processor != DefaultImageProcessor.default else {
+                handleNoCache()
                 return
             }
             
-            handleNoCache()
+            // If processor is not the default one, we have a chance to check whether
+            // the original image is already in cache.
+            let optionsWithoutProcessor = options.removeAllMatchesIgnoringAssociatedValue(.processor(processor))
+            targetCache.retrieveImage(forKey: key, options: optionsWithoutProcessor) { image, cacheType in
+                // If we found the original image, there is no need to download it again.
+                // We could just apply processor to it now.
+                guard let image = image else {
+                    handleNoCache()
+                    return
+                }
+                
+                guard let processedImage = processor.process(item: .image(image), options: options) else {
+                    diskTaskCompletionHandler(nil, nil, .none, url)
+                    return
+                }
+                targetCache.store(processedImage,
+                                  original: nil,
+                                  forKey: key,
+                                  processorIdentifier:options.processor.identifier,
+                                  cacheSerializer: options.cacheSerializer,
+                                  toDisk: !options.cacheMemoryOnly,
+                                  completionHandler: nil)
+                diskTaskCompletionHandler(processedImage, nil, .none, url)
+            }
         }
     }
 }

+ 2 - 2
Tests/KingfisherTests-macOS/Info.plist

@@ -15,10 +15,10 @@
 	<key>CFBundlePackageType</key>
 	<string>BNDL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>3.10.1</string>
+	<string>3.10.2</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>1066</string>
+	<string>1074</string>
 </dict>
 </plist>

+ 2 - 2
Tests/KingfisherTests-tvOS/Info.plist

@@ -15,10 +15,10 @@
 	<key>CFBundlePackageType</key>
 	<string>BNDL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>3.10.1</string>
+	<string>3.10.2</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>1066</string>
+	<string>1074</string>
 </dict>
 </plist>

+ 2 - 2
Tests/KingfisherTests/Info.plist

@@ -15,10 +15,10 @@
 	<key>CFBundlePackageType</key>
 	<string>BNDL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>3.10.1</string>
+	<string>3.10.2</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>1066</string>
+	<string>1074</string>
 </dict>
 </plist>

+ 11 - 1
Tests/KingfisherTests/KingfisherManagerTests.swift

@@ -367,13 +367,23 @@ class KingfisherManagerTests: XCTestCase {
         {
             let p = SimpleProcessor()
             
+            let cached = self.manager.cache.isImageCached(forKey: URLString, processorIdentifier: p.identifier)
+            XCTAssertFalse(cached.cached)
+            
             // No downloading will happen
             self.manager.retrieveImage(with: URL(string: URLString)!, options: [.processor(p)], progressBlock: nil) {
                 image, error, cacheType, url in
                 XCTAssertNotNil(image)
                 XCTAssertEqual(cacheType, .none)
                 XCTAssertTrue(p.processed)
-                expectation.fulfill()
+                
+                // The processed image should be cached
+                delay(0.1) {
+                    let cached = self.manager.cache.isImageCached(forKey: URLString, processorIdentifier: p.identifier)
+                    XCTAssertTrue(cached.cached)
+                    expectation.fulfill()
+                }
+                
             }
         }
         waitForExpectations(timeout: 5, handler: nil)