File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 71
71
},
72
72
"dependencies" : {
73
73
"fastify-plugin" : " ^5.0.0" ,
74
- "mnemonist " : " 0.40.3 "
74
+ "toad-cache " : " ^3.7.0 "
75
75
},
76
76
"tsd" : {
77
77
"directory" : " test"
Original file line number Diff line number Diff line change 1
1
'use strict'
2
2
3
- const LRUCache = require ( 'mnemonist/lru -cache' )
3
+ const { FifoMap : FifoCache } = require ( 'toad -cache' )
4
4
5
5
/**
6
6
* Field Value Components
@@ -67,7 +67,7 @@ function parse (header) {
67
67
}
68
68
69
69
function createAddFieldnameToVary ( fieldname ) {
70
- const headerCache = new LRUCache ( 1000 )
70
+ const headerCache = new FifoCache ( 1000 )
71
71
72
72
validateFieldname ( fieldname )
73
73
@@ -92,7 +92,7 @@ function createAddFieldnameToVary (fieldname) {
92
92
header = header . join ( ', ' )
93
93
}
94
94
95
- if ( ! headerCache . has ( header ) ) {
95
+ if ( headerCache . get ( header ) === undefined ) {
96
96
const vals = parse ( header )
97
97
98
98
if ( vals . indexOf ( '*' ) !== - 1 ) {
You can’t perform that action at this time.
0 commit comments