By using set command, you can set the value of the key.
Syntax
- set key flags exptime bytes [noreply]
- value
Example
In the given example, we use javatpoint as the key and set value Memcached in it with an expiration time of 900 seconds.
- set javatpoint 0 900 9
- memcached
- STORED
- get javatpoint
- VALUE javatpoint 0 9
- Memcached
- END