All Products
Document Center

Set key timeout

Last Updated: Jun 08, 2019

This section describes how to modify a key.


You must have access permissions to DMS and be logged on to the DMS console.


  1. Select an ApsaraDB for Redis instance and then click Log on to Database.

  2. After you log on to the instance, select the database that contains the target key from the drop-down list, as shown in the following figure:


  3. To search for a key, enter the key name or keyword of the key name in the search box, and the press Enter or click the magnifier icon.

  4. After the search is complete, select the target key in the key list. Right-click the key and then select Timeout. The Set Timeout window is displayed.


  5. Enter a TTL value in seconds, as shown in the following figure:



    • Do not set the TTL value to -1 unless needed. Setting a value smaller than 0 immediately times out the corresponding key. Keys that have timed out cannot be searched.

    • If the TTL field displays -1, no TTL value is set to the key and the key does not time out. This is the same as the result returned by the Redis TTL command.

  6. Click OK to submit the setting.


    Keys that have timed out cannot be searched.