{"id":44523,"library":"cachified-redis-json-adapter","title":"cachified-redis-json-adapter","description":"A caching adapter for @epic-web/cachified that supports redis-json (RedisJSON module). Version 2.0.0 is the current stable release, actively maintained by a single contributor. It provides a drop-in replacement for the built-in Redis adapter when you need to store cached JSON documents natively in Redis using the RedisJSON module, enabling partial updates and nested field retrieval. Ships TypeScript definitions.","status":"active","version":"2.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/tearingItUp786/cachified-redis-json-adapter","tags":["javascript","cachified","redis-json","typescript"],"install":[{"cmd":"npm install cachified-redis-json-adapter","lang":"bash","label":"npm"},{"cmd":"yarn add cachified-redis-json-adapter","lang":"bash","label":"yarn"},{"cmd":"pnpm add cachified-redis-json-adapter","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency – adapter is designed to be used with cachified's caching API.","package":"@epic-web/cachified","optional":false},{"reason":"Peer dependency – requires a redis-json client instance to be passed to the adapter.","package":"redis-json","optional":false}],"imports":[{"note":"ESM-only since v2.0.0; CommonJS require() will fail.","wrong":"const redisJsonCacheAdapter = require('cachified-redis-json-adapter')","symbol":"redisJsonCacheAdapter","correct":"import { redisJsonCacheAdapter } from 'cachified-redis-json-adapter'"},{"note":"Named export, not default export. The type is also exported.","wrong":"import RedisJsonCacheAdapter from 'cachified-redis-json-adapter'","symbol":"RedisJsonCacheAdapter","correct":"import { RedisJsonCacheAdapter } from 'cachified-redis-json-adapter'"},{"note":"Available since v1.1.0; deprecated in v2.0.0 (alias for redisJsonCacheAdapter). Prefer redisJsonCacheAdapter.","wrong":"import { createRedisJsonCache } from 'cachified-redis-json-adapter/dist'","symbol":"createRedisJsonCache","correct":"import { createRedisJsonCache } from 'cachified-redis-json-adapter'"}],"quickstart":{"code":"import {redisJsonCacheAdapter} from 'cachified-redis-json-adapter';\nimport {createClient} from 'redis';\nimport {cachified} from '@epic-web/cachified';\n\nconst redisClient = createClient();\nawait redisClient.connect();\nconst redisCache = redisJsonCacheAdapter(redisClient);\n\nconst result = await cachified({\n  key: 'my-key',\n  cache: redisCache,\n  getFreshValue: async () => ({hello: 'world'}),\n  ttl: 60_000,\n});\n\nconsole.log(result);\nawait redisClient.quit();","lang":"typescript","description":"Creates a RedisJSON cache adapter and uses it with cachified to cache a JSON object."},"warnings":[{"fix":"Use redisJsonCacheAdapter instead of createRedisJsonCache.","message":"Named change from createRedisJsonCache to redisJsonCacheAdapter in v2.0.0","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Switch to ESM imports in your project, or use dynamic import() in CJS.","message":"ESM-only package – CommonJS require() will throw ERR_REQUIRE_ESM","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Replace createRedisJsonCache with redisJsonCacheAdapter.","message":"createRedisJsonCache is deprecated since v2.0.0 and will be removed in a future version","severity":"deprecated","affected_versions":"<2.0.0"},{"fix":"Ensure the Redis server has the RedisJSON module installed and the client is connected before passing it.","message":"The adapter expects a redis-json client created with createClient() and JSON module loaded on the Redis server","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"search_vec":"'/cachified':13 '2.0.0':22 'activ':28 'adapt':5,8,47 'built':44 'built-in':43 'cach':7,53 'cachifi':2,74 'cachified-redis-json-adapt':1 'contributor':33 'current':25 'definit':72 'document':55 'drop':38 'drop-in':37 'enabl':63 'epic':11 'epic-web':10 'field':68 'javascript':73 'json':4,18,54,77 'maintain':29 'modul':20,62 'nativ':56 'need':50 'nest':67 'partial':64 'provid':35 'redi':3,17,46,58,76 'redis-json':16,75 'redisjson':19,61 'releas':27 'replac':40 'retriev':69 'ship':70 'singl':32 'stabl':26 'store':52 'support':15 'typescript':71,78 'updat':65 'use':59 'version':21 'web':12","created_at":"2026-06-07T12:50:33.406630+00:00","updated_at":"2026-06-07T12:50:33.406630+00:00","problems":[{"fix":"Use import { redisJsonCacheAdapter } from 'cachified-redis-json-adapter' or switch to dynamic import.","cause":"Importing the package with CommonJS require() after v2.0.0, which is ESM-only.","error":"TypeError: redisJsonCacheAdapter is not a function"},{"fix":"Convert your project to ESM or use import() inside an async function.","cause":"Trying to require() an ESM-only package in a CommonJS module.","error":"ERR_REQUIRE_ESM"},{"fix":"Run npm install cachified-redis-json-adapter @epic-web/cachified redis (or appropriate package manager).","cause":"Package not installed or not in node_modules.","error":"Module not found: Can't resolve 'cachified-redis-json-adapter'"}],"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/tearingItUp786/cachified-redis-json-adapter#readme","github":"https://github.com/tearingItUp786/cachified-redis-json-adapter","docs":null,"changelog":null,"pypi":null,"npm":"cachified-redis-json-adapter","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"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}}