Skip to content

Instantly share code, notes, and snippets.

View dzenbot's full-sized avatar

Ignacio Romero Zurbuchen dzenbot

  • DZN Technologies
  • Canada
View GitHub Profile
@codelynx
codelynx / ZCache.swift
Last active February 3, 2018 06:22
Make NSCache more generics with Swift.
import Foundation
class ZCache<T: AnyObject> {
private var cache = NSCache()
var delegate: NSCacheDelegate? {
get { return self.delegate }
set { self.cache.delegate = newValue }