import { type CacheTime, getCacheTimeInSeconds, } from "@/services/dataCache/Cache" import { cacheMap } from "./cacheMap" export async function set( key: string, data: T, ttl: CacheTime ): Promise { cacheMap.set(key, { data: data, expiresAt: Date.now() + getCacheTimeInSeconds(ttl) * 1000, }) }