Variable CacheConst

Cache: CacheUtils

Singleton instance of CacheUtils for convenient function caching.

import { Cache } from "./classes/Cache";

// Wrap expensive function with 1-hour cache
const cachedFn = Cache.fn(myExpensiveFunction, "1h");
const result = cachedFn(arg1, arg2);

// Cache is automatically invalidated when moving to next hour interval