Skip to content

Commit 3c868ed

Browse files
committed
Check to see if old response is used when no-store
1 parent 7071d1a commit 3c868ed

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

tests/cc-response.mjs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,37 @@ export default
9494
}
9595
]
9696
},
97+
{
98+
name: 'Does HTTP cache use older stored response when newer one came with `Cache-Control: no-store`?',
99+
id: 'cc-resp-no-store-old-new',
100+
depends_on: ['cc-resp-no-store'],
101+
spec_anchors: ['cache-response-directive.no-store'],
102+
requests: [
103+
{
104+
response_headers: [
105+
['Cache-Control', 'max-age=10000'],
106+
['Expires', 10000],
107+
['Date', 0],
108+
['A', '1']
109+
],
110+
setup: true,
111+
pause: true
112+
},
113+
{
114+
response_headers: [
115+
['Cache-Control', 'no-store'],
116+
['Date', 0]
117+
['A', '2']
118+
],
119+
setup: true,
120+
pause: true
121+
},
122+
{
123+
expected_type: 'cached',
124+
expected_response_headers: [['a', '1']],
125+
}
126+
]
127+
},
97128
{
98129
name: 'HTTP cache must not use a cached response with `Cache-Control: no-cache`, even with `max-age` and `Expires`',
99130
id: 'cc-resp-no-cache',

0 commit comments

Comments
 (0)