File tree Expand file tree Collapse file tree
packages/nextjs-cache-handler/src/handlers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -237,6 +237,11 @@ export default function createHandler({
237237 parseBuffersToStrings ( { ...cacheHandlerValue , value : valueForStorage } ) ;
238238 }
239239
240+ const serializedValue = JSON . stringify ( {
241+ ...cacheHandlerValue ,
242+ value : valueForStorage ,
243+ } ) ;
244+
240245 const setTagsOperation = client
241246 . withAbortSignal ( AbortSignal . timeout ( timeoutMs ) )
242247 . hSet (
@@ -251,13 +256,6 @@ export default function createHandler({
251256 . hSet ( keyPrefix + sharedTagsTtlKey , key , lifespan . expireAt )
252257 : undefined ;
253258
254- await Promise . all ( [ setTagsOperation , setSharedTtlOperation ] ) ;
255-
256- const serializedValue = JSON . stringify ( {
257- ...cacheHandlerValue ,
258- value : valueForStorage ,
259- } ) ;
260-
261259 switch ( keyExpirationStrategy ) {
262260 case "EXAT" : {
263261 const hasExpireAt = typeof lifespan ?. expireAt === "number" ;
@@ -297,7 +295,14 @@ export default function createHandler({
297295 }
298296 }
299297
300- await Promise . all ( [ setOperation , expireOperation ] ) ;
298+ await Promise . all (
299+ [
300+ setTagsOperation ,
301+ setSharedTtlOperation ,
302+ setOperation ,
303+ expireOperation ,
304+ ] . filter ( Boolean ) ,
305+ ) ;
301306 } ,
302307 async revalidateTag ( tag ) {
303308 assertClientIsReady ( ) ;
You can’t perform that action at this time.
0 commit comments