Redis String: SETEX
SETEX key seconds value
The Redis SETEX command is used to set some string value with specified timeout in seconds in redis key.
Syntax:
SETEX KEY_NAME TIMEOUT VALUE
Available since
2.0.0.
Return Value
Simple string reply. OK, if the value is set to key or Null if the value does not set.
Return Value Type
String
Example: Redis SETEX
redis 127.0.0.1:6379> SETEX mykey 60 redis OK redis 127.0.0.1:6379> TTL mykey 60 redis 127.0.0.1:6379> GET mykey "redis
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework