Cache.swift 244 B

12345678910111213141516
  1. import Foundation
  2. enum CacheError: Error {
  3. case codingError(Error)
  4. }
  5. protocol Cache: KeyValueStorage {}
  6. struct EncodableWrapper<T: Encodable>: Encodable {
  7. let v: T
  8. }
  9. struct DecodableWrapper<T: Decodable>: Decodable {
  10. let v: T
  11. }