Skip to content

Commit f333326

Browse files
CachePolicy.default as a stored property (#1998)
Changed CachePolicy.default to be a stored static property, so that users can customize the default policy.
1 parent 657c02d commit f333326

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

Sources/Apollo/ApolloClient.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ public enum CachePolicy {
1515
case returnCacheDataAndFetch
1616

1717
/// The current default cache policy.
18-
public static var `default`: CachePolicy {
19-
.returnCacheDataElseFetch
20-
}
18+
public static var `default`: CachePolicy = .returnCacheDataElseFetch
2119
}
2220

2321
/// A handler for operation results.

0 commit comments

Comments
 (0)