Created
July 26, 2017 00:04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// OurCache.swift | |
// ConflictingSymbolsViaProtocolExtensions | |
// | |
// Created by Alan Zeino on 7/19/17. | |
// Copyright © 2017 Alan Zeino. All rights reserved. | |
// | |
import Foundation | |
protocol Caching { | |
func objectForKey(_ key: AnyObject) -> AnyObject? | |
func removeObjectForKey(_ key: AnyObject) | |
} | |
class OurCache: NSCache<AnyObject, AnyObject>, Caching { } | |
let theCache = OurCache() | |
let obj = theCache.object(forKey: "foo" as AnyObject) |
Author
alanzeino
commented
Jul 26, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment