Skip to content

Commit

Permalink
Merge pull request #146 from wordpress-mobile/andrewdmontgomery/renam…
Browse files Browse the repository at this point in the history
…e-ImageCache

Use Gravatar.ImageCaching protocol instead of defining our own
  • Loading branch information
andrewdmontgomery authored Feb 26, 2024
2 parents f05feec + fc0e664 commit 3de7421
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Sources/WordPressUI/Extensions/UIImageView+Networking.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation
import UIKit
import protocol Gravatar.GravatarImageCaching
@_exported import protocol Gravatar.ImageCaching

#if SWIFT_PACKAGE
import WordPressUIObjC
Expand Down Expand Up @@ -173,11 +173,6 @@ public extension UIImageView {
}
}

public protocol ImageCaching: GravatarImageCaching {
func setImage(_ image: UIImage, forKey key: String)
func getImage(forKey key: String) -> UIImage?
}

public class ImageCache: ImageCaching {
private let cache = NSCache<NSString, UIImage>()

Expand Down

0 comments on commit 3de7421

Please sign in to comment.