UNPKG

@loopback/docs

Version:
39 lines (25 loc) 1.02 kB
--- lang: en title: 'API docs: repository.kvconnector.ttl' keywords: LoopBack 4.0, LoopBack 4 sidebar: lb4_sidebar permalink: /doc/en/lb4/apidocs.repository.kvconnector.ttl.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [KVConnector](./repository.kvconnector.md) &gt; [ttl](./repository.kvconnector.ttl.md) ## KVConnector.ttl() method Get ttl for an entry by key <b>Signature:</b> ```typescript ttl?(modelClass: Class<Entity>, key: string, ttl: number, options?: Options): Promise<number>; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | modelClass | <code>Class&lt;Entity&gt;</code> | Model class | | key | <code>string</code> | Key for the entry | | ttl | <code>number</code> | Time to live in millisenconds | | options | <code>Options</code> | Options for the operation | <b>Returns:</b> `Promise<number>` A promise of the TTL value