Page Contents
Home > @loopback/repository > KVConnector > ttl
KVConnector.ttl() method
Get ttl for an entry by key
Signature:
ttl?(modelClass: Class<Entity>, key: string, ttl: number, options?: Options): Promise<number>;
Parameters
Parameter | Type | Description |
---|---|---|
modelClass | Class<Entity> | Model class |
key | string | Key for the entry |
ttl | number | Time to live in millisenconds |
options | Options | Options for the operation |
Returns:
Promise<number>
A promise of the TTL value