Arguments
str
required
The key to persist
Response
True if the timeout was setDocumentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
redis.set("key1", "Hello")
redis.expire("key1", 10)
assert redis.ttl("key1") == 10
redis.persist("key1")
assert redis.ttl("key1") == -1
Remove any timeout set on the key.
True if the timeout was setredis.set("key1", "Hello")
redis.expire("key1", 10)
assert redis.ttl("key1") == 10
redis.persist("key1")
assert redis.ttl("key1") == -1
Was this page helpful?