Gathering detailed insights and metrics for lazy-cacache
Gathering detailed insights and metrics for lazy-cacache
Gathering detailed insights and metrics for lazy-cacache
Gathering detailed insights and metrics for lazy-cacache
npm install lazy-cacache
Typescript
Module System
Node Version
NPM Version
TypeScript (97.53%)
JavaScript (2.47%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
22 Commits
2 Watchers
1 Branches
1 Contributors
Updated on Jul 30, 2022
Latest Version
3.0.2
Package Id
lazy-cacache@3.0.2
Unpacked Size
57.70 kB
Size
12.43 kB
File Count
18
NPM Version
8.15.0
Node Version
18.7.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
a wrap class of cacache
npm install lazy-cacache
1import Cacache from 'lazy-cacache';
2import * as path from 'path';
3
4(async () => {
5
6 // create Cacache object
7 let cache1 = new Cacache('lazy-cacache');
8 // => cachePath: 'xxxx\\node_modules\\.cache\\lazy_cacache'
9 let cache2 = await Cacache.createAsync({
10 name: 'lazy-cacache',
11 useGlobalCache: true,
12 });
13 // => cachePath: 'T:\\cache\\npm-cache\\.cache\\lazy_cacache'
14 let cache3 = await Cacache.createAsync({
15 cachePath: path.join(__dirname, '.mycache'),
16 // if not set, u will need create by self
17 autoCreateDir: true,
18 });
19 // => cachePath: 'xxxx\\test\\.mycache'
20
21 console.dir(cache1);
22 console.dir(cache2);
23 console.dir(cache3);
24
25 let key1 = 'data1';
26 let key2 = 'data2';
27
28 // delete all exists cache
29 await cache1.removeAll();
30
31 // read cache info
32 console.log(await cache1.readDataInfo(key1));
33 console.log(await cache1.readDataInfo(key2));
34
35 // save a cache data
36 console.log(await cache1.writeData(key1, 'data111'));
37 console.log(await cache1.writeJSON(key2, {
38 data: 222,
39 }));
40
41 // read cache info again, see what return
42 console.log(await cache1.readDataInfo(key1));
43 console.log(await cache1.readDataInfo(key2));
44
45 // read cache data
46 console.log(await cache1.readData(key1));
47 console.log(await cache1.readJSON(key2));
48
49})();
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 0/22 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More