You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ios/Sources/GutenbergKit/Sources/Stores/EditorAssetLibrary.swift
+18-19Lines changed: 18 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -3,16 +3,12 @@ import Foundation
3
3
/// The Editor Asset Library is a site-specific repository of remote assets that can be downloaded to the local device to support plugins and theme styles.
4
4
///
5
5
publicactorEditorAssetLibrary{
6
-
7
-
publicenumCachePolicy:Sendable{
8
-
case useExisting
9
-
case forceRefresh
10
-
}
11
-
6
+
12
7
privateletconfiguration:EditorConfiguration
13
8
privatelethttpClient:EditorHTTPClientProtocol
14
9
privateletstorageRoot:URL
15
-
10
+
privateletcachePolicy:EditorCachePolicy
11
+
16
12
/// Creates a new `EditorAssetLibrary` instance.
17
13
///
18
14
/// - Parameters:
@@ -22,33 +18,36 @@ public actor EditorAssetLibrary {
22
18
publicinit(
23
19
configuration:EditorConfiguration,
24
20
httpClient:EditorHTTPClientProtocol,
21
+
cachePolicy:EditorCachePolicy=.always,
25
22
storageRoot:URL
26
23
){
27
24
self.configuration = configuration
28
25
self.httpClient = httpClient
29
26
self.storageRoot = storageRoot
27
+
self.cachePolicy = cachePolicy
30
28
}
31
-
29
+
32
30
// MARK: - Manifest Handling
33
-
31
+
34
32
/// Retrieve the manifest for a given site configuration.
35
33
///
36
34
/// Applications should periodically check for a new editor manifest. This can be very expensive, so this method defaults to returning an existing one on-disk.
0 commit comments