File tree 1 file changed +46
-15
lines changed
1 file changed +46
-15
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ export default
53
53
{
54
54
response_headers : [
55
55
[ 'Expires' , 60 ] ,
56
- [ 'Date' , 120 ]
56
+ [ 'Date' , 70 ]
57
57
]
58
58
} ,
59
59
{
@@ -75,6 +75,36 @@ export default
75
75
}
76
76
]
77
77
} ,
78
+ {
79
+ name : 'HTTP cache does not reuse a response when the Age header is greater than its Expires freshness lifetime' ,
80
+ requests : [
81
+ {
82
+ response_headers : [
83
+ [ 'Date' , 0 ] ,
84
+ [ 'Expires' , 10 ] ,
85
+ [ 'Age' , '15' ]
86
+ ]
87
+ } ,
88
+ {
89
+ expected_type : 'not_cached'
90
+ }
91
+ ]
92
+ } ,
93
+ {
94
+ name : 'HTTP cache does not reuse a response when the Age header is greater than its Expires freshness lifetime, and Date is fast' ,
95
+ requests : [
96
+ {
97
+ response_headers : [
98
+ [ 'Date' , 5 ] ,
99
+ [ 'Expires' , 10 ] ,
100
+ [ 'Age' , '8' ]
101
+ ]
102
+ } ,
103
+ {
104
+ expected_type : 'not_cached'
105
+ }
106
+ ]
107
+ } ,
78
108
{
79
109
name : 'HTTP cache reuses a response with positive Cache-Control: max-age' ,
80
110
requests : [
@@ -101,6 +131,21 @@ export default
101
131
}
102
132
]
103
133
} ,
134
+ {
135
+ name : 'HTTP cache does not reuse a response when the Age header is greater than its Cache-Control: max-age freshness lifetime' ,
136
+ requests : [
137
+ {
138
+ response_headers : [
139
+ [ 'Date' , 0 ] ,
140
+ [ 'Cache-Control' , 'max-age=10' ] ,
141
+ [ 'Age' , '15' ]
142
+ ]
143
+ } ,
144
+ {
145
+ expected_type : 'not_cached'
146
+ }
147
+ ]
148
+ } ,
104
149
{
105
150
name : 'HTTP cache reuses a response with positive Cache-Control: max-age and a past Expires' ,
106
151
requests : [
@@ -175,20 +220,6 @@ export default
175
220
}
176
221
] ,
177
222
browser_skip : true
178
- } ,
179
- {
180
- name : 'HTTP cache does not reuse a response when the Age header is greater than its freshness lifetime' ,
181
- requests : [
182
- {
183
- response_headers : [
184
- [ 'Cache-Control' , 'max-age=3600' ] ,
185
- [ 'Age' , '12000' ]
186
- ]
187
- } ,
188
- {
189
- expected_type : 'not_cached'
190
- }
191
- ]
192
223
}
193
224
]
194
225
}
You can’t perform that action at this time.
0 commit comments