File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -545,6 +545,7 @@ var accountStoreCache;
545
545
var pkiStoreCache ;
546
546
var rootKeyCache ;
547
547
let SAFARI_CACHE_SIZE = 1024 * 1024 * 700 ;
548
+ let MAX_CACHE_SIZE = 1024 * 1024 * 1024 * 5 ;
548
549
549
550
function bindCacheStore ( storeCache ) {
550
551
blockStoreCache = storeCache ;
@@ -641,7 +642,7 @@ function isSafariTest() {
641
642
}
642
643
function getBrowserStorageQuota ( ) {
643
644
if ( navigator . storage && navigator . storage . estimate ) {
644
- return navigator . storage . estimate ( ) . then ( quota => quota . quota ) ;
645
+ return navigator . storage . estimate ( ) . then ( quota => Math . min ( MAX_CACHE_SIZE , quota . quota ) ) ;
645
646
} else {
646
647
647
648
let prom = new Promise ( function ( resolve , reject ) { resolve ( isSafariTest ( ) ? SAFARI_CACHE_SIZE : 0 ) } ) ;
You can’t perform that action at this time.
0 commit comments