Skip to main content

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

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

Returns:

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

Cache connection properties