From 6f5bc6e2759b0cecf1e7dd1058c384b636a136f5 Mon Sep 17 00:00:00 2001 From: Jakub Date: Wed, 15 Jan 2020 13:38:22 +0100 Subject: [PATCH] set cache-control with max-age=60 for /metadata/all (#68) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- back-end/controllers/dapps-metadata-controller.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/back-end/controllers/dapps-metadata-controller.js b/back-end/controllers/dapps-metadata-controller.js index 8443b54..fb1a105 100644 --- a/back-end/controllers/dapps-metadata-controller.js +++ b/back-end/controllers/dapps-metadata-controller.js @@ -130,6 +130,8 @@ class DAppsMetadataController { dappsFormatedMetadata[metadataHash] = dappsMetadata[i] } + /* don't cache for longer than 60 seconds to show new dapps quicker */ + res.set('Cache-Control', 'public, max-age=60') res.status(200).json(dappsFormatedMetadata) }