Skip to content

Instantly share code, notes, and snippets.

@RoshanNindrai
Created March 7, 2018 05:39
Show Gist options
  • Save RoshanNindrai/cbc5a8dbd228cda71dc45947c1167bd0 to your computer and use it in GitHub Desktop.
Save RoshanNindrai/cbc5a8dbd228cda71dc45947c1167bd0 to your computer and use it in GitHub Desktop.
public protocol ComposableCache {
associatedtype Key
associatedtype Value
var getC: (Key) -> Value? { get set }
var setC: (Key, Value) -> Void { get set }
init(getC: @escaping (Key) -> Value?, setC: @escaping ((Key, Value) -> Void))
func get(_ key: Key) -> Value?
func set(_ key: Key, _ value: Value)
}
@dedey2042
Copy link

__940493403

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment