Skip to main content
Version: Next

TestCaches.init()

Home > @backstage/backend-test-utils > TestCaches > init

Returns a fresh, empty cache for the given driver.

Signature:

init(id: TestCacheId): Promise<{
store: string;
connection: string;
keyv: Keyv;
}>;

Parameters

Parameter

Type

Description

id

TestCacheId

The ID of the cache to use, e.g. 'REDIS_7'

**Returns:**

Promise<{ store: string; connection: string; keyv: Keyv; }>

Cache connection properties