# ICache.purge() method · @imqueue/rpc

Source: https://imqueue.org/api/rpc/latest/rpc.icache.purge/
Published: 2026-08-04
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/rpc 3.5.3 — generated reference, not hand-written

Deletes every key matching the given wildcard mask.

**Signature:**

```typescript
purge(keyMask: string): Promise<boolean>;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| keyMask | string | wildcard mask matched against fully qualified key names |


**Returns:**

Promise<boolean>

whether the purge ran

## Remarks

The mask is not automatically scoped to this cache — callers must include the namespace themselves (`<prefix>:<name>:...`). A broad mask such as `'*'` will delete unrelated data, including message-queue keys.

