Skip to content

Commit e578b9e

Browse files
authored
Add .spi.yml so that DocC documentation is generated (#45)
Add `.spi.yml` so that DocC documentation is generated for the `Memcache` target
1 parent 5b9db4a commit e578b9e

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.spi.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
version: 1
2+
builder:
3+
configs:
4+
- documentation_targets: [Memcache]

Sources/Memcache/MemcacheConnection.swift

+5-2
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,12 @@ public actor MemcacheConnection: Service {
211211

212212
/// Fetch the value for a key from the Memcache server.
213213
///
214-
/// - Parameter key: The key to fetch the value for.
214+
/// - Parameters:
215+
/// - key: The key to fetch the value for.
216+
/// - valueType: The type of the returned `Value`
215217
/// - Returns: A `Value` containing the fetched value, or `nil` if no value was found.
216218
/// - Throws: A `MemcacheError` that indicates the failure.
219+
217220
public func get<Value: MemcacheValue>(_ key: String, as valueType: Value.Type = Value.self) async throws -> Value? {
218221
var flags = MemcacheFlags()
219222
flags.shouldReturnValue = true
@@ -262,7 +265,7 @@ public actor MemcacheConnection: Service {
262265
/// - Parameters:
263266
/// - key: The key for which the value is to be set.
264267
/// - 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.
268+
/// - timeToLive: An optional `TimeToLive` value specifying the TTL (Time-To-Live) for the key-value pair.
266269
/// If provided, the key-value pair will be removed from the cache after the specified TTL duration has passed.
267270
/// If not provided, the key-value pair will persist indefinitely in the cache.
268271
/// - Throws: A `MemcacheError` that indicates the failure.

Sources/Memcache/MemcacheError.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ extension MemcacheError {
187187
self.code = code
188188
}
189189

190-
/// The ``MemcacheConection`` is already shutdown.
190+
/// The ``MemcacheConnection`` is already shutdown.
191191
public static var connectionShutdown: Self {
192192
Self(.connectionShutdown)
193193
}

0 commit comments

Comments
 (0)