import { type Result } from "@tsus/runtime";export type LoadError = { kind: "load_failed"; reason: string };export type CacheError = { kind: "invalid_ttl" };export type Cache<V> = { get: (key: string) => Promise<Result<V, LoadError>>; invalidate: (key: string) => void;};export const createCache = <V>( loader: (key: string) => Promise<Result<V, LoadError>>, ttlMs: number, now: () => number,): Result<Cache<V>, CacheError> => { // TODO};