|
|
@ -7,9 +7,14 @@
|
|
|
|
let key;
|
|
|
|
let key;
|
|
|
|
let value;
|
|
|
|
let value;
|
|
|
|
|
|
|
|
|
|
|
|
let store = new LazyStore("cache.json", { serializeFnName: "pretty-json" });
|
|
|
|
let store;
|
|
|
|
let cache = {};
|
|
|
|
let cache = {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function newStore() {
|
|
|
|
|
|
|
|
store = new LazyStore("cache.json", { serializeFnName: "pretty-json" });
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
newStore()
|
|
|
|
|
|
|
|
|
|
|
|
async function refreshEntries() {
|
|
|
|
async function refreshEntries() {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
const values = await store.entries();
|
|
|
|
const values = await store.entries();
|
|
|
@ -55,7 +60,7 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function reopen() {
|
|
|
|
function reopen() {
|
|
|
|
store = new LazyStore("cache.json");
|
|
|
|
newStore()
|
|
|
|
onMessage("We made a new `LazyStore` instance, operations will now work");
|
|
|
|
onMessage("We made a new `LazyStore` instance, operations will now work");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|