UNPKG
system-cache
Version:
latest (1.0.3)
1.0.3
1.0.2
1.0.1
1.0.0
use cache with this simple helper
system-cache
/
test.js
12 lines
(10 loc)
•
243 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
const
cache
=
require
(
'./index.js'
);
const
helper
=
new
cache
(); helper.
setOptions
({
async
:
true
,
regist
:
true
,
execFunction
:
async
() => {
return
database.
get
(
'hello'
) } }) helper.
setCache
({
title
: {
title
:
"a"
,
text
:
"a"
}});