import { LRUCache } from "lru-cache"; import { AuthenticatedUser } from "../auth"; const sessionCache = new LRUCache({ max: 100, ttl: 1000 * 60 * 60, }); export function cacheSession(key: string, user: AuthenticatedUser) { sessionCache.set(key, user); } export function getCachedSession(key: string) { return sessionCache.get(key); } export function removeCachedSession(key: string) { sessionCache.delete(key); }