---
lang: en
title: 'API docs: repository.defaultkeyvaluerepository.expire'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.repository.defaultkeyvaluerepository.expire.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [DefaultKeyValueRepository](./repository.defaultkeyvaluerepository.md) &gt; [expire](./repository.defaultkeyvaluerepository.expire.md)

## DefaultKeyValueRepository.expire() method

<b>Signature:</b>

```typescript
expire(key: string, ttl: number, options?: Options): Promise<void>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  key | <code>string</code> |  |
|  ttl | <code>number</code> |  |
|  options | <code>Options</code> |  |

<b>Returns:</b>

`Promise<void>`


