Skip to content

Commit 4205cf0

Browse files
committed
feat(rm): added memoization support to rm
1 parent c77d794 commit 4205cf0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: rm.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,25 @@
22

33
const Promise = require('bluebird')
44

5-
const rmContent = require('./lib/content/rm')
65
const index = require('./lib/entry-index')
6+
const memo = require('./lib/memoization')
77
const rimraf = Promise.promisify(require('rimraf'))
8+
const rmContent = require('./lib/content/rm')
89

910
module.exports.all = all
1011
function all (cache) {
12+
memo.clearMemoized()
1113
return rimraf(cache)
1214
}
1315

1416
module.exports.entry = entry
1517
function entry (cache, key) {
18+
memo.clearMemoized()
1619
return index.delete(cache, key)
1720
}
1821

1922
module.exports.content = content
2023
function content (cache, address) {
24+
memo.clearMemoized()
2125
return rmContent(cache, address)
2226
}

0 commit comments

Comments
 (0)