From 5d88cfdafee3933b40a41ac5f9dbe6f3493d0933 Mon Sep 17 00:00:00 2001 From: Joan Disho Date: Sat, 21 Mar 2020 16:08:14 +0100 Subject: [PATCH] Make `cachePolicy` an optional property --- Sources/TinyNetworking/ResourceType.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sources/TinyNetworking/ResourceType.swift b/Sources/TinyNetworking/ResourceType.swift index 96deb59..8158863 100644 --- a/Sources/TinyNetworking/ResourceType.swift +++ b/Sources/TinyNetworking/ResourceType.swift @@ -15,3 +15,9 @@ public protocol Resource { var cachePolicy: URLRequest.CachePolicy { get } } +public extension Resource { + var cachePolicy: URLRequest.CachePolicy { + return .useProtocolCachePolicy + } +} +