File tree 3 files changed +12
-4
lines changed
3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change
1
+ version : 1
2
+ builder :
3
+ configs :
4
+ - documentation_targets : [Memcache]
Original file line number Diff line number Diff line change @@ -210,10 +210,14 @@ public actor MemcacheConnection: Service {
210
210
// MARK: - Fetching Values
211
211
212
212
/// Fetch the value for a key from the Memcache server.
213
- ///
214
- /// - Parameter key: The key to fetch the value for.
213
+ ///
214
+ /// - Parameters:
215
+ /// - key: The key to fetch the value for.
216
+ /// - valueType: The type of the returned `Value`
215
217
/// - Returns: A `Value` containing the fetched value, or `nil` if no value was found.
216
218
/// - Throws: A `MemcacheError` that indicates the failure.
219
+
220
+
217
221
public func get< Value: MemcacheValue > ( _ key: String , as valueType: Value . Type = Value . self) async throws -> Value ? {
218
222
var flags = MemcacheFlags ( )
219
223
flags. shouldReturnValue = true
@@ -262,7 +266,7 @@ public actor MemcacheConnection: Service {
262
266
/// - Parameters:
263
267
/// - key: The key for which the value is to be set.
264
268
/// - value: The `MemcacheValue` to set for the key.
265
- /// - expiration : An optional `TimeToLive` value specifying the TTL (Time-To-Live) for the key-value pair.
269
+ /// - timeToLive : An optional `TimeToLive` value specifying the TTL (Time-To-Live) for the key-value pair.
266
270
/// If provided, the key-value pair will be removed from the cache after the specified TTL duration has passed.
267
271
/// If not provided, the key-value pair will persist indefinitely in the cache.
268
272
/// - Throws: A `MemcacheError` that indicates the failure.
Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ extension MemcacheError {
187
187
self . code = code
188
188
}
189
189
190
- /// The ``MemcacheConection `` is already shutdown.
190
+ /// The ``MemcacheConnection `` is already shutdown.
191
191
public static var connectionShutdown : Self {
192
192
Self ( . connectionShutdown)
193
193
}
You can’t perform that action at this time.
0 commit comments