import { isEdge } from "@/utils/isEdge" import { createInMemoryCache } from "./InMemoryCache" import { createUnstableCache } from "./UnstableCache" import type { DataCache } from "@/services/dataCache/Cache" export function createMemoryCache(): Promise { if (isEdge) { /** * unstable_cache is not available on the edge runtime */ return createInMemoryCache() } return createUnstableCache() }