'use strict'
const BB = require('bluebird')
const index = require('./lib/entry-index')
const memo = require('./lib/memoization')
const path = require('path')
const rimraf = BB.promisify(require('rimraf'))
const rmContent = require('./lib/content/rm')
module.exports = entry
module.exports.entry = entry
function entry (cache, key) {
memo.clearMemoized()
return index.delete(cache, key)
}
module.exports.content = content
function content (cache, integrity) {
memo.clearMemoized()
return rmContent(cache, integrity)
}
module.exports.all = all
function all (cache) {
memo.clearMemoized()
return rimraf(path.join(cache, '*(content-*|index-*)'))
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| lib | Folder | 0755 |
|
|
| locales | Folder | 0755 |
|
|
| CHANGELOG.md | File | 22.31 KB | 0644 |
|
| LICENSE.md | File | 755 B | 0644 |
|
| README.es.md | File | 20.48 KB | 0644 |
|
| README.md | File | 20 KB | 0644 |
|
| en.js | File | 58 B | 0644 |
|
| es.js | File | 58 B | 0644 |
|
| get.js | File | 6.71 KB | 0644 |
|
| index.js | File | 58 B | 0644 |
|
| ls.js | File | 121 B | 0644 |
|
| package.json | File | 3.32 KB | 0644 |
|
| put.js | File | 1.91 KB | 0644 |
|
| rm.js | File | 661 B | 0644 |
|
| verify.js | File | 55 B | 0644 |
|