mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-12 09:26:26 +01:00
30 lines
527 B
Swift
30 lines
527 B
Swift
//
|
|
// FaviconCache.swift
|
|
// Evergreen
|
|
//
|
|
// Created by Brent Simmons on 11/23/17.
|
|
// Copyright © 2017 Ranchero Software. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
final class FaviconCache {
|
|
|
|
static var cache = [String: Favicon]()
|
|
|
|
class func cachedFavicon(_ homePageURL: String) -> Favicon? {
|
|
|
|
return cache[homePageURL]
|
|
}
|
|
|
|
class func cacheFavicon(_ homePageURL: String, _ favicon: Favicon) {
|
|
|
|
cache[homePageURL] = favicon
|
|
}
|
|
|
|
class func removeFavicon(_ homePageURL: String) {
|
|
|
|
cache[homePageURL] = nil
|
|
}
|
|
}
|