Skip to content

Commit 3e0d6c7

Browse files
committed
fix(api): async drop
drop should be async
1 parent 870ad4b commit 3e0d6c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ async function remove(bin, key) {
5858
]);
5959
}
6060

61-
function drop(bins) {
61+
async function drop(bins) {
6262
bins = [].concat(bins);
63-
bins.map(bin => cacheBins[bin].clear());
63+
return await Promise.all(bins.map(bin => cacheBins[bin].clear()));
6464
}
6565

6666
function createCache(bins, name = DEFAULT_NAME, description = DEFAULT_DESCRIPTION, driver = DB_DRIVER) {

0 commit comments

Comments
 (0)