source: trip-planner-front/node_modules/cacache/rm.js@ eed0bf8

Last change on this file since eed0bf8 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 676 bytes
RevLine 
[6a3a178]1'use strict'
2
3const util = require('util')
4
5const index = require('./lib/entry-index')
6const memo = require('./lib/memoization')
7const path = require('path')
8const rimraf = util.promisify(require('rimraf'))
9const rmContent = require('./lib/content/rm')
10
11module.exports = entry
12module.exports.entry = entry
13
14function entry (cache, key, opts) {
15 memo.clearMemoized()
16 return index.delete(cache, key, opts)
17}
18
19module.exports.content = content
20
21function content (cache, integrity) {
22 memo.clearMemoized()
23 return rmContent(cache, integrity)
24}
25
26module.exports.all = all
27
28function all (cache) {
29 memo.clearMemoized()
30 return rimraf(path.join(cache, '*(content-*|index-*)'))
31}
Note: See TracBrowser for help on using the repository browser.