Skip to content

Commit efa2435

Browse files
docs: Improves documentation wording
1 parent ce4f800 commit efa2435

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This project provides [valkey-swift](https://github.com/valkey-io/valkey-swift)
44

55
## Usage
66

7-
To use this package, add it as a dependency. Then create a Valkey client and assign it to `Application.valkey`:
7+
To use this package, add it as a dependency to your Package.swift. Then create a Valkey client and assign it to `Application.valkey`:
88

99
```swift
1010
import Valkey
@@ -27,8 +27,8 @@ app.caches.use(.valkey())
2727
app.sessions.use(.valkey())
2828
```
2929

30-
When assigning the Application's `valkey` property (the `vaporApp.valkey = valkeyClient` line above), the Application will take ownership of the Valkey client's lifecycle. Specifically, this assignment operation will automatically run the client, and it will be automatically cancelled when the Application is shut down.
30+
When assigning the Application's `valkey` property (the `app.valkey = valkeyClient` line above), the Application will take ownership of the Valkey client's lifecycle. Specifically, this assignment operation will automatically run the client, and it will be automatically cancelled when the Application is shut down.
3131

32-
Application's `valkey` property can accept either `ValkeyClient` or `ValkeyClusterClient`. For more information about these clients and their configuration, see [valkey-swift](https://github.com/valkey-io/valkey-swift).
32+
The Application's `valkey` property can accept either `ValkeyClient` or `ValkeyClusterClient`. For more information about these clients and their configuration, see [valkey-swift](https://github.com/valkey-io/valkey-swift).
3333

3434
For more information about Vapor's session system, see [Sessions](https://docs.vapor.codes/advanced/sessions/)

Sources/VaporValkey/Service.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ extension Application {
1616
/// eventLoopGroup: app.eventLoopGroup,
1717
/// logger: app.logger
1818
/// )
19-
/// app.valkey.set("hello", value: "world")
19+
/// try await app.valkey.set("hello", value: "world")
2020
/// app.get("hello") { req in
2121
/// try await req.valkey.get("hello")?.string ?? "not found"
2222
/// }

Sources/VaporValkey/Valkey+Cache.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public extension Application.Caches.Provider {
1212
/// eventLoopGroup: app.eventLoopGroup,
1313
/// logger: app.logger
1414
/// )
15-
/// app.cache.use(.valkey())
15+
/// app.caches.use(.valkey())
1616
/// try await app.cache.set("hello", to: "world")
1717
/// app.get("hello") { req in
1818
/// try await req.cache.get("hello", as: String.self) ?? "not found"

0 commit comments

Comments
 (0)