添加 Redis 支持
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-04-09 15:57:28 +08:00
parent cd689aba98
commit 5e5f13a949
6 changed files with 67 additions and 0 deletions

View File

@ -3,10 +3,12 @@ import './server-only.ts'
import type { RenderableTreeNode } from '@markdoc/markdoc'
import KeyV from 'keyv'
import { createHash } from 'node:crypto'
import { storage } from './keyv-cache.server.ts'
const markdocVersion = '1'
export const markdocCache = new KeyV<RenderableTreeNode>({
store: storage,
namespace: `markdoc-cache-${markdocVersion}`,
ttl: 1000 * 60 * 60 * 24 * 7,
})