Skip to content

Commit

Permalink
chore: Update the name of the 'delete' method of LRU cache (appium#678)
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach committed Jun 29, 2023
1 parent a152bf5 commit 4e04e94
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/tools/aab-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ aabUtilsMethods.extractUniversalApk = async function extractUniversalApk (aabPat
if (await fs.exists(resultPath)) {
return resultPath;
}
AAB_CACHE.del(cacheHash);
AAB_CACHE.delete(cacheHash);
}

await this.initAapt2();
Expand Down
2 changes: 1 addition & 1 deletion lib/tools/apk-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ apkUtilsMethods.cacheApk = async function cacheApk (apkPath, options = {}) {
}
// Cleanup the invalid entries from the cache
_.difference([...this.remoteAppsCache.keys()], remoteCachedFiles.map(toHash))
.forEach((hash) => this.remoteAppsCache.del(hash));
.forEach((hash) => this.remoteAppsCache.delete(hash));
// Bump the cache record for the recently cached item
this.remoteAppsCache.set(appHash, remotePath);
// If the remote cache exceeds this.remoteAppsCacheLimit, remove the least recently used entries
Expand Down
2 changes: 1 addition & 1 deletion lib/tools/apks-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ async function extractFromApks (apks, dstPath) {
if (await fs.exists(resultPath)) {
return resultPath;
}
APKS_CACHE.del(apksHash);
APKS_CACHE.delete(apksHash);
}

const tmpRoot = await tempDir.openDir();
Expand Down

0 comments on commit 4e04e94

Please sign in to comment.