From 3c692e3fcf24318af98651f6530790c7c36d7962 Mon Sep 17 00:00:00 2001 From: Jake Ginnivan Date: Tue, 20 Aug 2024 10:56:11 +0800 Subject: [PATCH] Fix config and more caching improvements --- website/app/lib/config.server.ts | 5 ++++- website/app/lib/mdx.server.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/website/app/lib/config.server.ts b/website/app/lib/config.server.ts index 32d811d..0e9bdec 100644 --- a/website/app/lib/config.server.ts +++ b/website/app/lib/config.server.ts @@ -23,7 +23,10 @@ export const { OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: z.string().optional(), OTEL_EXPORTER_OTLP_LOGS_ENDPOINT: z.string().optional(), - USE_GITHUB_CONTENT: z.string().transform((val) => val === 'true'), + USE_GITHUB_CONTENT: z + .string() + .transform((val) => val === 'true') + .default('true'), GITHUB_REF: z.string().default('main'), GITHUB_TOKEN: z.string().optional(), diff --git a/website/app/lib/mdx.server.ts b/website/app/lib/mdx.server.ts index 860162c..a57c9ae 100644 --- a/website/app/lib/mdx.server.ts +++ b/website/app/lib/mdx.server.ts @@ -48,7 +48,7 @@ const compilationCache = new LRUCache({ const contentListingCache = new LRUCache({ max: 250, maxSize: 1024 * 1024 * 12, // 12 mb - ttl: 1000 * 60 * 60 * 24, // 24 hours + ttl: 1000 * 60 * 60, // 1 hour sizeCalculation(value, key) { return JSON.stringify(value).length + (key ? key.length : 0) },