function createInMemory
createInMemory(): InMemoryConnector

Creates an in-memory cache connector for testing and development.

Examples

Example 1

import { Cache, createInMemory } from "@anabranch/cache";

const cache = await Cache.connect(createInMemory()).run();
await cache.set("key", "value", { ttl: 5000 }).run();

Return Type

Usage

import { createInMemory } from ".";