# ICache interface · @imqueue/rpc

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

Generic cache adapter interface. Any cache engine implementation must conform to this contract to be usable within IMQ.

**Signature:**

```typescript
export interface ICache 
```

## Properties


| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [name](https://imqueue.org/api/rpc/latest/rpc.icache.name/) |  | string | Adapter (cache) name. |
| [ready](https://imqueue.org/api/rpc/latest/rpc.icache.ready/) |  | boolean | Whether the cache adapter is initialized and ready to use. |


## Methods


| Method | Description |
| --- | --- |
| [del(key)](https://imqueue.org/api/rpc/latest/rpc.icache.del/) | Removes the value stored in the cache under the given key. |
| [get(key)](https://imqueue.org/api/rpc/latest/rpc.icache.get/) | Returns the value stored in the cache under the given key. |
| [init(options)](https://imqueue.org/api/rpc/latest/rpc.icache.init/) | Initializes the cache adapter with the given adapter-specific options. |
| [purge(keyMask)](https://imqueue.org/api/rpc/latest/rpc.icache.purge/) | Deletes every key matching the given wildcard mask. |
| [set(key, value, ttl)](https://imqueue.org/api/rpc/latest/rpc.icache.set/) | Stores the given value in the cache under the given key. |

