Skip to content

Commit 126e26f

Browse files
DOC-3967 moved patterns folder to clients
1 parent 6ab6b8e commit 126e26f

File tree

11 files changed

+6
-6
lines changed

11 files changed

+6
-6
lines changed

content/commands/set.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ SET anotherkey "will expire in a minute" EX 60
148148

149149
## Patterns
150150

151-
**Note:** The following pattern is discouraged in favor of [the Redlock algorithm]({{< relref "/develop/use/patterns/distributed-locks" >}}) which is only a bit more complex to implement, but offers better guarantees and is fault tolerant.
151+
**Note:** The following pattern is discouraged in favor of [the Redlock algorithm]({{< relref "/develop/clients/patterns/distributed-locks" >}}) which is only a bit more complex to implement, but offers better guarantees and is fault tolerant.
152152

153153
The command `SET resource-name anystring NX EX max-lock-time` is a simple way to implement a locking system with Redis.
154154

content/commands/setnx.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ GET mykey
7272

7373
**Please note that:**
7474

75-
1. The following pattern is discouraged in favor of [the Redlock algorithm]({{< relref "/develop/use/patterns/distributed-locks" >}}) which is only a bit more complex to implement, but offers better guarantees and is fault tolerant.
75+
1. The following pattern is discouraged in favor of [the Redlock algorithm]({{< relref "/develop/clients/patterns/distributed-locks" >}}) which is only a bit more complex to implement, but offers better guarantees and is fault tolerant.
7676
2. We document the old pattern anyway because certain existing implementations link to this page as a reference. Moreover it is an interesting example of how Redis commands can be used in order to mount programming primitives.
7777
3. Anyway even assuming a single-instance locking primitive, starting with 2.6.12 it is possible to create a much simpler locking primitive, equivalent to the one discussed here, using the [`SET`]({{< relref "/commands/set" >}}) command to acquire the lock, and a simple Lua script to release the lock. The pattern is documented in the [`SET`]({{< relref "/commands/set" >}}) command page.
7878

content/develop/use/patterns/_index.md renamed to content/develop/clients/patterns/_index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ categories:
1010
- kubernetes
1111
- clients
1212
description: Novel patterns for working with Redis data structures
13-
linkTitle: Patterns
14-
title: Redis programming patterns
15-
weight: 6
13+
linkTitle: Coding patterns
14+
title: Coding patterns
15+
weight: 50
1616
---
1717

1818
The following documents describe some novel development patterns you can use with Redis.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)