From a3a2edc217c3c558763c9e161824230c38909f40 Mon Sep 17 00:00:00 2001 From: kaivean Date: Sun, 29 Oct 2023 18:20:55 +0800 Subject: [PATCH] chore(view): ejs add cache --- packages/view/src/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/view/src/index.ts b/packages/view/src/index.ts index 5e91ab7..27f90cf 100644 --- a/packages/view/src/index.ts +++ b/packages/view/src/index.ts @@ -125,6 +125,9 @@ async function plugin(fastify: FastifyInstance, opts: HothViewOptions) { }); } } + else if (type === 'ejs') { + engine.cache = renderCaches; + } const renderer = renders[type];