Skip to content

Commit

Permalink
up safari storage to 700MiB
Browse files Browse the repository at this point in the history
  • Loading branch information
kevodwyer committed Jul 26, 2023
1 parent 7b310e1 commit b3d7fcc
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions vendor/priors/gwt.js
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ var batStoreCache;
var accountStoreCache;
var pkiStoreCache;
var rootKeyCache;
let SAFARI_CACHE_SIZE = 1024 * 1024 * 200;
let SAFARI_CACHE_SIZE = 1024 * 1024 * 700;

function bindCacheStore(storeCache) {
blockStoreCache = storeCache;
Expand All @@ -534,17 +534,15 @@ function getCurrentDesiredCacheSize() {
}
function getDesiredCacheSize() {
let future = peergos.shared.util.Futures.incomplete();
if (isSafariTest()) {
future.complete(SAFARI_CACHE_SIZE);
} else {
getIDBKV("desiredSize", blockStoreCache.cacheDesiredSizeStore).then((val) => {
if (val == null) {
future.complete(-1);
} else {
future.complete(val);
}
});
}
getIDBKV("desiredSize", blockStoreCache.cacheDesiredSizeStore).then((val) => {
if (val == null || val == -1) {
future.complete(-1);
} else if(val == 0 && isSafariTest()) {
future.complete(SAFARI_CACHE_SIZE);
} else {
future.complete(val);
}
});
return future;
}
function setDesiredCacheSize(desiredSize) {
Expand Down

0 comments on commit b3d7fcc

Please sign in to comment.