Page Contents
Home > @loopback/repository > KeyValueRepository > ttl
KeyValueRepository.ttl() method
Get ttl for an entry by key
Signature:
ttl?(key: string, options?: Options): Promise<number>;
Parameters
Parameter | Type | Description |
---|---|---|
key | string | Key for the entry |
options | Options | Options for the operation |
Returns:
Promise<number>
A promise of the TTL value