Const
Singleton instance of CacheUtils for convenient function caching.
import { Cache } from "./classes/Cache";// Wrap expensive function with 1-hour cacheconst cachedFn = Cache.fn(myExpensiveFunction, "1h");const result = cachedFn(arg1, arg2);// Cache is automatically invalidated when moving to next hour interval Copy
import { Cache } from "./classes/Cache";// Wrap expensive function with 1-hour cacheconst cachedFn = Cache.fn(myExpensiveFunction, "1h");const result = cachedFn(arg1, arg2);// Cache is automatically invalidated when moving to next hour interval
Singleton instance of CacheUtils for convenient function caching.