Skip to content

Add .spi.yml so that DocC documentation is generated #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .spi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
version: 1
builder:
configs:
- documentation_targets: [Memcache]
7 changes: 5 additions & 2 deletions Sources/Memcache/MemcacheConnection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,12 @@ public actor MemcacheConnection: Service {

/// Fetch the value for a key from the Memcache server.
///
/// - Parameter key: The key to fetch the value for.
/// - Parameters:
/// - key: The key to fetch the value for.
/// - valueType: The type of the returned `Value`
/// - Returns: A `Value` containing the fetched value, or `nil` if no value was found.
/// - Throws: A `MemcacheError` that indicates the failure.

public func get<Value: MemcacheValue>(_ key: String, as valueType: Value.Type = Value.self) async throws -> Value? {
var flags = MemcacheFlags()
flags.shouldReturnValue = true
Expand Down Expand Up @@ -262,7 +265,7 @@ public actor MemcacheConnection: Service {
/// - Parameters:
/// - key: The key for which the value is to be set.
/// - value: The `MemcacheValue` to set for the key.
/// - expiration: An optional `TimeToLive` value specifying the TTL (Time-To-Live) for the key-value pair.
/// - timeToLive: An optional `TimeToLive` value specifying the TTL (Time-To-Live) for the key-value pair.
/// If provided, the key-value pair will be removed from the cache after the specified TTL duration has passed.
/// If not provided, the key-value pair will persist indefinitely in the cache.
/// - Throws: A `MemcacheError` that indicates the failure.
Expand Down
2 changes: 1 addition & 1 deletion Sources/Memcache/MemcacheError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ extension MemcacheError {
self.code = code
}

/// The ``MemcacheConection`` is already shutdown.
/// The ``MemcacheConnection`` is already shutdown.
public static var connectionShutdown: Self {
Self(.connectionShutdown)
}
Expand Down