Skip to content

Clear Key Expiration Time

Description

This operation clears a timeout associated with a key. Note that all keys are created without timeouts by default, and you can set it by invoking the "Set Key Expiration - TTL" or the "Set Key Expiration - Unix time" operations.

Method

Backendless.Hive(hiveName).StoreType(key).clearExpiration();

where:

Argument                Description
hiveName Name of a hive where the operation is performed. String value.
StoreType This placeholder must be substituted with one of the following stores types: KeyValueStore, ListStore, MapStore, SetStore, SortedSetStore.
key Key name to clear a timeout for. String value.

Return Value

None.

Example

The example below clears the TTL or Unix time timeout set for the "fruits" key.

Backendless.Hive("groceryStore").ListStore("fruits").clearExpiration();

where:

Argument                Description
"groceryStore" Name of a hive where the operation is performed.
"fruits" Key name in the store to clear the timeout for.

Codeless Reference

general_api_clear_keys_expiration_time

where:

Argument                Description
hive name Name of a hive where the operation is performed.
type Storage type, can be one of the following: Key / Value, Sorted Set, Set, Map, List.
key name Key name to clear a timeout for.

Consider the following Key Value storage:

sample-key-value

The example below deletes the timeout set on the "Japan" key.

general_api_example_clear_keys_expiration_time