Merged in fix/cache-fixes (pull request #1555)

fix/cache: reduce cachetime when null response from CS. Fix fuzzy delete

* fix/cache: reduce cachetime when null response from CS. Fix fuzzy delete


Approved-by: Anton Gunnarsson
This commit is contained in:
Linus Flood
2025-03-17 14:39:59 +00:00
parent c5ad3cba34
commit f183125bc6
6 changed files with 33 additions and 11 deletions

View File

@@ -10,9 +10,13 @@ export const fetchAndCacheEntry = async (path: string, lang: Lang) => {
return cache.cacheOrGet(
cacheKey,
async () => {
async (overrideTTL) => {
const { contentType, uid } = await resolveEntry(path, lang)
if (!contentType || !uid) {
overrideTTL?.("10m")
}
return {
contentType,
uid,