Skip to content

Commit b217f7a

Browse files
committed
cache user permissions for 2 hours
1 parent 589a42a commit b217f7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/routes/protected.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const protectedRoute: FastifyPluginAsync = async (fastify, _options) => {
55
fastify.register(fastifyCaching, {
66
privacy: fastifyCaching.privacy.PRIVATE,
77
serverExpiresIn: 0,
8-
expiresIn: 60 * 15,
8+
expiresIn: 60 * 60 * 2,
99
});
1010
fastify.get("/", async (request, reply) => {
1111
const roles = await fastify.authorize(request, reply, []);

0 commit comments

Comments
 (0)