## LRUCache.set() method [​](/content/docs/sdk/core.lrucache.set#lrucacheset-method/index.html)

Sets the value for the given key.

**Signature:**

```typescript
set(key: string, val: T): void;
```

## Parameters [​](/content/docs/sdk/core.lrucache.set#parameters/index.html)

| Parameter | Type | Description |
| --- | --- | --- |
| key | string | The key to set. |
| val | T | The value to set. |

**Returns:**

void

- [LRUCache.set() method](/content/docs/sdk/core.lrucache.set#lrucacheset-method/index.html)
- [Parameters](/content/docs/sdk/core.lrucache.set#parameters/index.html)
