-
-
Save fitomad/43d15e8b3e49763590d764635fc4bcee to your computer and use it in GitHub Desktop.
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
/** | |
Añade una cita a la caché. | |
El usuario nos pasa un `Data` como valor un `String` | |
con el nombre del recurso que representa la cita. | |
Los convertimos en un NSData y NSString respectivamente | |
para operar con nuestra caché. | |
- Parameters: | |
- quote: Los bytes que representan la cita | |
- key: La clave por la que buscamos la imagen | |
*/ | |
public func add(_ quote: Data, forKey key: String) -> Void | |
{ | |
let theData = quote as NSData | |
let theKey = key as NSString | |
self.cache.setObject(theData, forKey: theKey) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment