diff --git a/Sources/Compute/Fastly/FastlyCache.swift b/Sources/Compute/Fastly/FastlyCache.swift index 7d20fb48..acd75b0e 100644 --- a/Sources/Compute/Fastly/FastlyCache.swift +++ b/Sources/Compute/Fastly/FastlyCache.swift @@ -76,7 +76,7 @@ extension Fastly.Cache { public static func lookup(_ key: String) throws -> Transaction { var handle: WasiHandle = 0 - let options = CacheLookupOptions.reserved + let options = CacheLookupOptions.none var config = CacheLookupConfig() try wasi(fastly_cache__cache_transaction_lookup(key, key.utf8.count, options.rawValue, &config, &handle)) return Transaction(handle) @@ -120,7 +120,7 @@ extension Fastly.Cache { public func getBody() throws -> Fastly.Body { var bodyHandle: WasiHandle = 0 - let options = CacheGetBodyOptions.reserved + let options = CacheGetBodyOptions.none var config = CacheGetBodyConfig() try wasi(fastly_cache__cache_get_body(handle, options.rawValue, &config, &bodyHandle)) return .init(bodyHandle) diff --git a/Sources/Compute/Fastly/FastlyTypes.swift b/Sources/Compute/Fastly/FastlyTypes.swift index c73cd4a4..4905766a 100644 --- a/Sources/Compute/Fastly/FastlyTypes.swift +++ b/Sources/Compute/Fastly/FastlyTypes.swift @@ -392,6 +392,8 @@ public struct CacheState: OptionSet { public static let stale = CacheState(rawValue: 1 << 2) public static let mustInsertOrUpdate = CacheState(rawValue: 1 << 3) + public static let none: CacheState = [] + public let rawValue: UInt8 public init(rawValue: UInt8) { self.rawValue = rawValue @@ -437,6 +439,8 @@ public struct CacheWriteOptions: OptionSet, Sendable { public static let userMetadata = CacheWriteOptions(rawValue: 1 << 7) public static let sensitiveData = CacheWriteOptions(rawValue: 1 << 8) + public static let none: CacheWriteOptions = [] + public let rawValue: UInt32 public init(rawValue: UInt32) { self.rawValue = rawValue @@ -447,6 +451,8 @@ public struct CacheLookupOptions: OptionSet, Sendable { public static let reserved = CacheLookupOptions(rawValue: 1 << 0) public static let requestHeaders = CacheLookupOptions(rawValue: 1 << 1) + public static let none: CacheLookupOptions = [] + public let rawValue: UInt32 public init(rawValue: UInt32) { self.rawValue = rawValue @@ -458,6 +464,8 @@ public struct CacheGetBodyOptions: OptionSet, Sendable { public static let from = CacheLookupOptions(rawValue: 1 << 1) public static let to = CacheLookupOptions(rawValue: 1 << 2) + public static let none: CacheGetBodyOptions = [] + public let rawValue: UInt32 public init(rawValue: UInt32) { self.rawValue = rawValue