---
lang: en
title: 'API docs: repository.keyvaluerepository'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/packages/repository
permalink: /doc/en/lb4/apidocs.repository.keyvaluerepository.html
---

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

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [KeyValueRepository](./repository.keyvaluerepository.md)

## KeyValueRepository interface

Key/Value operations for connector implementations

<b>Signature:</b>

```typescript
export interface KeyValueRepository<T extends Model> extends Repository<T> 
```
<b>Extends:</b> [Repository](./repository.repository.md)<!-- -->&lt;T&gt;

## Methods

|  Method | Description |
|  --- | --- |
|  [delete(key, options)](./repository.keyvaluerepository.delete.md) | Delete an entry by key |
|  [deleteAll(options)](./repository.keyvaluerepository.deleteall.md) | Delete all entries |
|  [expire(key, ttl, options)](./repository.keyvaluerepository.expire.md) | Set up ttl for an entry by key |
|  [get(key, options)](./repository.keyvaluerepository.get.md) | Get an entry by key |
|  [keys(filter, options)](./repository.keyvaluerepository.keys.md) | Get an Iterator for matching keys |
|  [set(key, value, options)](./repository.keyvaluerepository.set.md) | Set an entry with key/value |
|  [ttl(key, options)](./repository.keyvaluerepository.ttl.md) | Get ttl for an entry by key |


