feat: Add common package * Add isEdge, safeTry and dataCache to new common package * Add eslint and move prettier config * Fix yarn lock * Clean up tests * Add lint-staged config to common * Add missing dependencies Approved-by: Joakim Jäderberg
11 lines
317 B
TypeScript
11 lines
317 B
TypeScript
import { cacheOrGet } from "./cacheOrGet"
|
|
import { deleteKey } from "./deleteKey"
|
|
import { get } from "./get"
|
|
import { set } from "./set"
|
|
|
|
import type { DataCache } from "../../Cache"
|
|
|
|
export async function createInMemoryCache(): Promise<DataCache> {
|
|
return { type: "in-memory", cacheOrGet, deleteKey, get, set }
|
|
}
|