From c093c9237b26e4aa153e9aee5647447c65ed11a0 Mon Sep 17 00:00:00 2001 From: voidlizard Date: Mon, 10 Feb 2025 15:53:12 +0300 Subject: [PATCH] hbs2-peer, cache control tune --- hbs2-peer/app/HttpWorker.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hbs2-peer/app/HttpWorker.hs b/hbs2-peer/app/HttpWorker.hs index 54de5014..3f6971f3 100644 --- a/hbs2-peer/app/HttpWorker.hs +++ b/hbs2-peer/app/HttpWorker.hs @@ -177,14 +177,14 @@ httpWorker (PeerConfig syn) pmeta = do get "/ref/:key" do void $ flip runContT pure do ref <- lift (pathParam @String "key") - lift $ addHeader "Cache-Control" "public, must-revalidate, max-age=0" + lift $ addHeader "Cache-Control" "public, must-revalidate, max-age=300" handleRef Nothing (Left ref) get "/ref/:key/:part" do void $ flip runContT pure do ref <- lift (pathParam @String "key") part <- lift (pathParam @Text "part") - lift $ addHeader "Cache-Control" "public, must-revalidate, max-age=0" + lift $ addHeader "Cache-Control" "public, must-revalidate, max-age=300" handleRef (Just part) (Left ref) -- TODO: define-parsable-instance-for-our-types @@ -198,7 +198,7 @@ httpWorker (PeerConfig syn) pmeta = do void $ flip runContT pure do ref <- lift (pathParam @String "hash") part <- lift (pathParam @Text "part") - lift $ addHeader "Cache-Control" "public, must-revalidate, max-age=0" + lift $ addHeader "Cache-Control" "public, must-revalidate, max-age=300" handleRef (Just part) (Right ref) get "/cat/:hash" do