UNPKG

mathsteps-experimental-fork

Version:

Step by step math solutions. Experimental Fork

29 lines (24 loc) 836 B
'use strict'; Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); const index = require('../node_modules/.pnpm/lru-cache@11.0.2/node_modules/lru-cache/dist/esm/index.js'); const MyNodeToStringCache = new index.LRUCache({ max: 5e3, // Maximum number of items in the cache ttl: 1e3 * 60 * 10, // Time-to-live in milliseconds (10 minutes) updateAgeOnGet: true, // Refresh TTL on access updateAgeOnHas: true, // Refresh TTL on set allowStale: false, // Do not return stale items // dispose: (key: any, value: any) => { // console.log(`Evicted cache key: ${key}`) // // Optional cleanup logic // }, maxSize: 5e3, // Maximum size of the cache in storage sizeCalculation: (value) => value.length // Use string length as size }); exports.MyNodeToStringCache = MyNodeToStringCache;