From 6aa877d930808c60ff5d71a0ee8fb9ebad85defd Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 13 Apr 2024 13:28:08 -0500 Subject: [PATCH] Cache /api/v1/instance for 5 minutes --- src/app.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.ts b/src/app.ts index d5d3ce4..099db06 100644 --- a/src/app.ts +++ b/src/app.ts @@ -134,7 +134,7 @@ app.get('/users/:username', actorController); app.get('/nodeinfo/:version', nodeInfoSchemaController); -app.get('/api/v1/instance', instanceController); +app.get('/api/v1/instance', cache({ cacheName: 'web', expires: Time.minutes(5) }), instanceController); app.get('/api/v1/apps/verify_credentials', appCredentialsController); app.post('/api/v1/apps', createAppController);