summaryrefslogtreecommitdiffstats
path: root/iredis/data/commands/persist.md
blob: 4819230d139c209be12039b09ba4d647acc15f8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Remove the existing timeout on `key`, turning the key from _volatile_ (a key
with an expire set) to _persistent_ (a key that will never expire as no timeout
is associated).

@return

@integer-reply, specifically:

- `1` if the timeout was removed.
- `0` if `key` does not exist or does not have an associated timeout.

@examples

```cli
SET mykey "Hello"
EXPIRE mykey 10
TTL mykey
PERSIST mykey
TTL mykey
```