1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

Add SetEX command

This commit is contained in:
TwinProduction
2020-10-22 14:38:36 -04:00
parent 38caa12762
commit cc71f5d293
3 changed files with 35 additions and 1 deletions

View File

@ -188,6 +188,13 @@ func ExampleClient_Set() {
}
}
func ExampleClient_SetEX() {
err := rdb.SetEX(ctx, "key", "value", time.Hour).Err()
if err != nil {
panic(err)
}
}
func ExampleClient_Incr() {
result, err := rdb.Incr(ctx, "counter").Result()
if err != nil {