# Cache

## Available:

* Redis
* Fake

## Methods:

**Save:** Caches a value passed in a key.

```typescript
const data = { message: 'data' };

await this.cacheProvider.save('key:id=123', data);
```

**Recovery:** Retrieves cached data from a key.

```typescript
const data = await this.cacheProvider.recovery('key:id=123');
```

**Invalidate:** Deletes a specific key value set.

```typescript
await this.cacheProvider.invalidate('key:id=123');
```

**InvalidatePrefix:** Deletes all key value sets started by the passed key.

```typescript
await this.cacheProvider.invalidatePrefix('key');
```

***
