From b58d4b4ed316a0e3438d16a98c447e3b675704b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Re=C3=A9?= Date: Thu, 6 Nov 2025 07:45:35 +0100 Subject: [PATCH] Add Cache.revalidateTag, Case.updateTag - add Cache.revalidateTag with mandatory profile option (as in v16) - add Cache.updateTag - Cache.cacheTag, Cache.cacheLife are already provided --- src/GreenfinityNext_Cache.res | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/GreenfinityNext_Cache.res b/src/GreenfinityNext_Cache.res index 08a29d1..bc9c0ea 100644 --- a/src/GreenfinityNext_Cache.res +++ b/src/GreenfinityNext_Cache.res @@ -4,7 +4,19 @@ type cacheType = @module("next/cache") external revalidatePath: (string, ~_type: cacheType=?) => unit = "revalidatePath" + +type revalidateProfileOptions = {expire?: int} +@unboxed +type revalidateProfile = | @as("max") Max | Options(revalidateProfileOptions) + +@module("next/cache") +external revalidateTag: (string, ~profile: revalidateProfile) => unit = "revalidateTag" + +@module("next/cache") +external updateTag: string => unit = "updateTag" + @module("next/cache") external cacheTag: string => unit = "cacheTag" + @module("next/cache") external cacheLife: string => unit = "cacheLife" /**