Last change
on this file since 571e0df was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
676 bytes
|
Line | |
---|
1 | 'use strict'
|
---|
2 |
|
---|
3 | const util = require('util')
|
---|
4 |
|
---|
5 | const index = require('./lib/entry-index')
|
---|
6 | const memo = require('./lib/memoization')
|
---|
7 | const path = require('path')
|
---|
8 | const rimraf = util.promisify(require('rimraf'))
|
---|
9 | const rmContent = require('./lib/content/rm')
|
---|
10 |
|
---|
11 | module.exports = entry
|
---|
12 | module.exports.entry = entry
|
---|
13 |
|
---|
14 | function entry (cache, key, opts) {
|
---|
15 | memo.clearMemoized()
|
---|
16 | return index.delete(cache, key, opts)
|
---|
17 | }
|
---|
18 |
|
---|
19 | module.exports.content = content
|
---|
20 |
|
---|
21 | function content (cache, integrity) {
|
---|
22 | memo.clearMemoized()
|
---|
23 | return rmContent(cache, integrity)
|
---|
24 | }
|
---|
25 |
|
---|
26 | module.exports.all = all
|
---|
27 |
|
---|
28 | function all (cache) {
|
---|
29 | memo.clearMemoized()
|
---|
30 | return rimraf(path.join(cache, '*(content-*|index-*)'))
|
---|
31 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.