File tree 2 files changed +7
-7
lines changed
src/debugger/devtools_client
test/debugger/devtools_client
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -52,15 +52,15 @@ function setCacheTTL () {
52
52
53
53
cacheTimer = setTimeout ( function ( ) {
54
54
cacheTimer = null
55
- if ( Date . now ( ) - cacheTime < 1_000 ) {
56
- // If the last cache entry was added less then 1s ago , keep the cache alive
55
+ if ( Date . now ( ) - cacheTime < 2_500 ) {
56
+ // If the last cache entry was added recently , keep the cache alive
57
57
setCacheTTL ( )
58
58
} else {
59
59
// Optimize for app boot, where a lot of reads might happen
60
60
// Clear cache a few seconds after it was last used
61
61
cache . clear ( )
62
62
}
63
- } , 10_000 ) . unref ( )
63
+ } , 5_000 ) . unref ( )
64
64
}
65
65
66
66
function loadInlineSourceMap ( data ) {
Original file line number Diff line number Diff line change @@ -188,8 +188,8 @@ describe('source map utils', function () {
188
188
expect ( readFile . callCount ) . to . equal ( 1 )
189
189
} )
190
190
191
- it ( 'should clear cache after 10 seconds' , async function ( ) {
192
- clock . tick ( 10_000 )
191
+ it ( 'should clear cache after 5 seconds' , async function ( ) {
192
+ clock . tick ( 5_000 )
193
193
const sourceMap = await loadSourceMap ( dir , sourceMapURL )
194
194
expect ( sourceMap ) . to . deep . equal ( parsedSourceMap )
195
195
expect ( readFile . callCount ) . to . equal ( 2 )
@@ -213,8 +213,8 @@ describe('source map utils', function () {
213
213
expect ( readFileSync . callCount ) . to . equal ( 1 )
214
214
} )
215
215
216
- it ( 'should clear cache after 10 seconds' , function ( ) {
217
- clock . tick ( 10_000 )
216
+ it ( 'should clear cache after 5 seconds' , function ( ) {
217
+ clock . tick ( 5_000 )
218
218
const sourceMap = loadSourceMapSync ( dir , sourceMapURL )
219
219
expect ( sourceMap ) . to . deep . equal ( parsedSourceMap )
220
220
expect ( readFileSync . callCount ) . to . equal ( 2 )
You can’t perform that action at this time.
0 commit comments