Compare commits
1 Commits
9eac89cf6d
...
7e7f206f90
Author | SHA1 | Date | |
---|---|---|---|
|
7e7f206f90 |
@ -1,4 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// First visit -> 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');
|
header('Cache-Control: s-max-age=10, stale-while-revalidate=20');
|
||||||
sleep(5);
|
sleep(5);
|
||||||
print('This is a slow test. ' . date('Y-m-d H:i:s'));
|
print('This is a slow test. ' . date('Y-m-d H:i:s'));
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
header('Cache-Control: s-max-age=1, stale-while-revalidate=20');
|
header('Cache-Control: s-max-age=1, stale-while-revalidate=99999999');
|
||||||
sleep(5);
|
sleep(5);
|
||||||
print('This is a slow instant test. ' . date('Y-m-d H:i:s'));
|
print('This is a slow instant test. ' . date('Y-m-d H:i:s'));
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user