We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9cd3080 commit 4c2e9edCopy full SHA for 4c2e9ed
1 file changed
packages/web/src/app/api/(server)/avatar/route.ts
@@ -55,14 +55,15 @@ export const GET = apiHandler(async (request: NextRequest) => {
55
});
56
}
57
58
- // Fallback: identicons are deterministic from the email so they can be
59
- // cached aggressively.
+ // Fallback: identicon. Cache lifetime matches the redirect path so the
+ // response naturally revalidates as users sign up, set profile pictures,
60
+ // or transient lookup errors recover.
61
const svg = minidenticon(email, 50, 50);
62
return new Response(svg, {
63
status: 200,
64
headers: {
65
'Content-Type': 'image/svg+xml',
- 'Cache-Control': 'public, max-age=31536000, immutable',
66
+ 'Cache-Control': 'public, max-age=300',
67
},
68
69
}, { track: false });
0 commit comments