> ## Documentation Index
> Fetch the complete documentation index at: https://botmesh.afaya.com.co/llms.txt
> Use this file to discover all available pages before exploring further.

# MemoryCoordinationHub

> Class exported by @botmesh/core/testing.

Defined in: [coordination/MemoryCoordinator.ts:112](https://github.com/andresayac/botmesh/blob/main/packages/core/src/coordination/MemoryCoordinator.ts#L112)

Shared state of the replicas of one in-process cluster: pass the same hub to every
[MemoryCoordinator](https://botmesh.afaya.com.co/api/core/testing/classes/MemoryCoordinator.md) that should coordinate with the others.

## Constructors

### Constructor

```ts theme={null}
new MemoryCoordinationHub(opts?): MemoryCoordinationHub;
```

Defined in: [coordination/MemoryCoordinator.ts:118](https://github.com/andresayac/botmesh/blob/main/packages/core/src/coordination/MemoryCoordinator.ts#L118)

#### Parameters

| Parameter | Type | Description |
| - | - | - |
| `opts?` | \{ `maxIdleKeys?`: `number`; } | - |
| `opts.maxIdleKeys?` | `number` | Idle chats kept (least recently used evicted first). Default `10_000`; `Infinity` keeps them all (the old behaviour). The chat being used is never evicted, so `0` keeps only the most recently used idle chat. |

#### Returns

`MemoryCoordinationHub`

## Accessors

### maxIdleKeys

#### Get Signature

```ts theme={null}
get maxIdleKeys(): number;
```

Defined in: [coordination/MemoryCoordinator.ts:127](https://github.com/andresayac/botmesh/blob/main/packages/core/src/coordination/MemoryCoordinator.ts#L127)

Idle chats kept before the least recently used are evicted.

##### Returns

`number`

***

### size

#### Get Signature

```ts theme={null}
get size(): number;
```

Defined in: [coordination/MemoryCoordinator.ts:130](https://github.com/andresayac/botmesh/blob/main/packages/core/src/coordination/MemoryCoordinator.ts#L130)

Chats the hub currently tracks (busy and idle).

##### Returns

`number`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.