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=60, stale-while-revalidate=20'); sleep(5); print('This is a slow test with data cached for 10s but updated smartly. ' . date('Y-m-d H:i:s')); ?>