Skip to content

Commit 7f2899e

Browse files
committed
worker: Update cache-control directive
1 parent 9c590c0 commit 7f2899e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

badgers-worker/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use worker::*;
66
mod icon;
77
mod utils;
88

9-
const DEFAULT_CACHE_DURATION: u32 = 3600; // 1 hour
9+
const DEFAULT_CACHE_DURATION: u32 = 300; // 5 minutes
1010
const ERROR_CACHE_DURATION: u32 = 300; // 5 minutes
1111

1212
#[event(fetch)]
@@ -29,7 +29,7 @@ pub async fn main(req: Request, env: Env, _ctx: worker::Context) -> Result<Respo
2929
headers
3030
.set(
3131
"Cache-Control",
32-
&format!("public, max-age={cache_duration}, immutable"),
32+
&format!("public, max-age={cache_duration}, no-transform, must-revalidate"),
3333
)
3434
.ok()?;
3535
Some(headers)

0 commit comments

Comments
 (0)