fix: Tiny fixes in common package * Fix self-referencing and circular imports * Fix env isServer Approved-by: Joakim Jäderberg
17 lines
356 B
TypeScript
17 lines
356 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 createDistributedCache(): Promise<DataCache> {
|
|
return {
|
|
type: "redis",
|
|
get,
|
|
set,
|
|
cacheOrGet,
|
|
deleteKey,
|
|
} satisfies DataCache
|
|
}
|