ICache interface

Generic cache adapter interface. Any cache engine implementation must conform to this contract to be usable within IMQ.

Signature:

export interface ICache 

Properties

Property

Modifiers

Type

Description

name

string

Adapter (cache) name.

ready

boolean

Whether the cache adapter is initialized and ready to use.

Methods

Method

Description

del(key)

Removes the value stored in the cache under the given key.

get(key)

Returns the value stored in the cache under the given key.

init(options)

Initializes the cache adapter with the given adapter-specific options.

purge(keyMask)

Deletes every key matching the given wildcard mask.

set(key, value, ttl)

Stores the given value in the cache under the given key.

Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.