From 7e7f206f90798760230a187bc3e228c66c91bd51 Mon Sep 17 00:00:00 2001 From: Pierre Martin Date: Mon, 8 Mar 2021 15:40:45 +0100 Subject: [PATCH] Better illustrate the purpose --- web/index.php | 5 +++++ web/slow-but-fast.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/web/index.php b/web/index.php index 71f39a2..2a25efd 100644 --- a/web/index.php +++ b/web/index.php @@ -1,4 +1,9 @@ 5s, times match +// Second visit -> instant, times don't match +// … T+14 -> instant, times don't match +// … T+15 (or 16) -> instant, times match (or almost) +// Nothing for 30s -> 5s, times match header('Cache-Control: s-max-age=10, stale-while-revalidate=20'); sleep(5); print('This is a slow test. ' . date('Y-m-d H:i:s')); diff --git a/web/slow-but-fast.php b/web/slow-but-fast.php index 027920b..d6aec80 100644 --- a/web/slow-but-fast.php +++ b/web/slow-but-fast.php @@ -1,5 +1,5 @@