{"id":46737,"library":"ut-cache","title":"ut-cache","description":"A caching module for the UT framework. Current stable version is 6.0.1. Release cadence follows the UT monorepo releases. Key differentiator: tightly integrated with the UT ecosystem for cache management in Node.js applications.","status":"active","version":"6.0.1","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/softwaregroup-bg/ut-cache","tags":["javascript"],"install":[{"cmd":"npm install ut-cache","lang":"bash","label":"npm"},{"cmd":"yarn add ut-cache","lang":"bash","label":"yarn"},{"cmd":"pnpm add ut-cache","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package is ESM-only; no CommonJS exports. Use import statement.","wrong":"const cache = require('ut-cache')","symbol":"default","correct":"import cache from 'ut-cache'"},{"note":"Named export for the Cache class, not default. Requires destructured import.","wrong":"import Cache from 'ut-cache'","symbol":"Cache","correct":"import { Cache } from 'ut-cache'"},{"note":"Factory function is a named export.","wrong":"import createCache from 'ut-cache'","symbol":"createCache","correct":"import { createCache } from 'ut-cache'"}],"quickstart":{"code":"import { createCache } from 'ut-cache';\n\nconst cache = createCache({ ttl: 60000 });\n\n// Set a value\ncache.set('key', 'value');\n\n// Get a value\nconst value = cache.get('key');\nconsole.log(value); // 'value'\n\n// Check if key exists\nif (cache.has('key')) {\n  console.log('Key exists');\n}\n\n// Delete a key\ncache.delete('key');\n\n// Clear all cache\ncache.clear();","lang":"typescript","description":"Shows basic usage of createCache to instantiate a cache with TTL, and set/get/has/delete/clear operations."},"warnings":[{"fix":"Use import statements instead of require().","message":"ESM-only: package no longer supports CommonJS require().","severity":"breaking","affected_versions":">=6.0.0"},{"fix":"Use named imports like import { Cache } from 'ut-cache'.","message":"As of version 6.0.0, the default export has been replaced with named exports (Cache, createCache).","severity":"deprecated","affected_versions":">=6.0.0"},{"fix":"Convert timestamps with new Date(timestamp) if needed.","message":"Unix timestamp vs Date object: set() and get() return Unix timestamps as numbers, not Date objects.","severity":"gotcha","affected_versions":">=6.0.0"},{"fix":"Call methods synchronously.","message":"Async not supported: all methods are synchronous. Do not await cache methods.","severity":"gotcha","affected_versions":">=6.0.0"}],"env_vars":null,"search_vec":"'6.0.1':15 'applic':36 'cach':3,5,32 'cadenc':17 'current':11 'differenti':24 'ecosystem':30 'follow':18 'framework':10 'integr':26 'javascript':37 'key':23 'manag':33 'modul':6 'monorepo':21 'node.js':35 'releas':16,22 'stabl':12 'tight':25 'ut':2,9,20,29 'ut-cach':1 'version':13","created_at":"2026-06-07T13:01:22.911109+00:00","updated_at":"2026-06-07T13:01:22.911109+00:00","problems":[{"fix":"Use import { createCache } from 'ut-cache' instead.","cause":"Using default import when package only exports named exports.","error":"TypeError: cache.default is not a function"},{"fix":"Use import statement or upgrade to Node.js with --experimental-require-module.","cause":"Using CommonJS require() on ESM-only package.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module not supported"},{"fix":"Ensure createCache() is called and assigned: const cache = createCache({...});","cause":"Cache instance not created correctly; variable holds undefined or wrong object.","error":"TypeError: cache.set is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/softwaregroup-bg/ut-cache#readme","github":"ssh://git@github.com/softwaregroup-bg/ut-cache","docs":null,"changelog":null,"pypi":null,"npm":"ut-cache","openapi_spec":null,"status_page":null,"smithery":null,"categories":["storage"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}