File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,49 @@ export default {
55
55
}
56
56
]
57
57
} ,
58
+ {
59
+ name : 'An optimal cache serves stale stored response with [`Cache-Control: stale-while-revalidate`](https://httpwg.org/specs/rfc5861.html).' ,
60
+ id : 'stale-while-revalidate' ,
61
+ kind : 'optimal' ,
62
+ requests : [
63
+ {
64
+ setup : true ,
65
+ pause_after : true ,
66
+ response_headers : [
67
+ [ 'Cache-Control' , 'max-age=1, stale-while-revalidate=3600' ] ,
68
+ [ 'ETag' , '"abc"' ]
69
+ ]
70
+ } ,
71
+ {
72
+ expected_type : 'cached'
73
+ }
74
+ ]
75
+ } ,
76
+ {
77
+ name : 'HTTP cache must not serve stale stored response after the [`stale-while-revalidate`](https://httpwg.org/specs/rfc5861.html) window.' ,
78
+ id : 'stale-while-revalidate-window' ,
79
+ depends_on : [ 'stale-while-revalidate' ] ,
80
+ requests : [
81
+ {
82
+ setup : true ,
83
+ pause_after : true ,
84
+ response_headers : [
85
+ [ 'Cache-Control' , 'max-age=1, stale-while-revalidate=4' ] ,
86
+ [ 'ETag' , '"abc"' ]
87
+ ]
88
+ } ,
89
+ {
90
+ setup : true ,
91
+ pause_after : true ,
92
+ expected_type : 'cached'
93
+ } ,
94
+ {
95
+ expected_response_headers : [
96
+ [ 'client-request-count' , '3' ]
97
+ ]
98
+ }
99
+ ]
100
+ } ,
58
101
{
59
102
name : 'Does HTTP cache serve stale stored response when server sends `Cache-Control: stale-if-error` and subsequently closes the connection?' ,
60
103
id : 'stale-sie-close' ,
You can’t perform that action at this time.
0 commit comments