import { type CacheTime, getCacheTimeInSeconds } from "../../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, }) }