Upstash Documentation home page
Search...
⌘K
Ask AI
Discord
Blog
X
Console
Console
Search...
Navigation
Generic
PERSIST
General
Redis
Kafka
Vector
QStash
SDKs
Developer API
Overall
Overview
SDKs
Typescript
@upstash/redis
Overview
Get Started
Commands
Overview
Auth
Bitmap
Generic
DEL
EXISTS
EXPIRE
EXPIREAT
KEYS
PERSIST
PEXPIRE
PEXPIREAT
PTTL
RANDOMKEY
RENAME
RENAMENX
SCAN
TOUCH
TTL
TYPE
UNLINK
Hash
Json
List
PubSub
Scripts
Server
Set
Sorted Set
Stream
String
Transactions
Deployment
Pipeline
Advanced
Retries
Troubleshooting
Developing or Testing
@upstash/query
@upstash/vector
@upstash/edge-flags
@upstash/ratelimit
@upstash/kafka
@upstash/qstash
Python
DevOps
Terraform
Pulumi
CLI
Example
Copy
Ask AI
await
redis
.
persist
(
key
);
Generic
PERSIST
Remove any timeout set on the key.
Example
Copy
Ask AI
await
redis
.
persist
(
key
);
Arguments
key
string
required
The key to persist
Response
1
if the timeout was removed,
0
if
key
does not exist or does not have an associated timeout.
Example
Copy
Ask AI
await
redis
.
persist
(
key
);
Was this page helpful?
Yes
No
Suggest edits
Raise issue
KEYS
PEXPIRE
Assistant
Responses are generated using AI and may contain mistakes.