Skip to content

Commit

Permalink
update cache time to 12 hrs
Browse files Browse the repository at this point in the history
  • Loading branch information
RealFascinated committed Feb 28, 2025
1 parent 8dac8e8 commit 2c9704a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/(pages)/(app)/(files)/[id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ async function getFileMetadata(
if (isVideo) {
headers.set("Accept-Ranges", "bytes");
} else if (isImage) {
headers.set("Cache-Control", "public, max-age=3600"); // Cache for 1 hour
headers.set("Cache-Control", "public, max-age=43200"); // 12 hours
}

// Download file, or is not image and is not video
Expand Down
2 changes: 1 addition & 1 deletion src/app/(pages)/(app)/(files)/thumbnails/[id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export async function GET(
return new Response(thumbnail, {
headers: {
"Content-Type": "image/webp",
"Cache-Control": "public, max-age=3600",
"Cache-Control": "public, max-age=43200", // 12 hours
},
});
}

0 comments on commit 2c9704a

Please sign in to comment.