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

LRU cache (least recently used) Source: [https://stackoverflow.com/a/46432113](https://stackoverflow.com/a/46432113)

**Signature:**

```typescript
export declare class LRUCache<T>
```

## Constructors [​](/content/docs/sdk/core.lrucache#constructors/index.html)

| Constructor | Modifiers | Description |
| --- | --- | --- |
| [(constructor)(max)](/content/docs/sdk/core.lrucache._constructor_/index.html) |  | Constructs a new instance of the `LRUCache` class |

## Methods [​](/content/docs/sdk/core.lrucache#methods/index.html)

| Method | Modifiers | Description |
| --- | --- | --- |
| [clear()](/content/docs/sdk/core.lrucache.clear) |  | Deletes all values from the cache. |
| [delete(key)](/content/docs/sdk/core.lrucache.delete) |  | Deletes the value for the given key. |
| [get(key)](/content/docs/sdk/core.lrucache.get) |  | Returns the value for the given key. |
| [keys()](/content/docs/sdk/core.lrucache.keys) |  | Returns the list of all keys in the cache. |
| [set(key, val)](/content/docs/sdk/core.lrucache.set) |  | Sets the value for the given key. |

- [LRUCache class](/content/docs/sdk/core.lrucache#lrucache-class/index.html)
- [Constructors](/content/docs/sdk/core.lrucache#constructors/index.html)
- [Methods](/content/docs/sdk/core.lrucache#methods/index.html)
