chore: updating deps

This commit is contained in:
Joel Male
2024-03-28 12:25:32 +10:00
parent 0de33a6f62
commit c54aaa0ec6
779 changed files with 586281 additions and 1021521 deletions
+23 -2
View File
@@ -1,5 +1,6 @@
var path = require('path');
var fs = require('fs');
var Keyv = require('keyv');
var utils = require('./utils');
var del = require('./del');
var writeJSON = utils.writeJSON;
@@ -17,8 +18,10 @@ var cache = {
load: function (docId, cacheDir) {
var me = this;
me._visited = {};
me._persisted = {};
me.keyv = new Keyv();
me.__visited = {};
me.__persisted = {};
me._pathToFile = cacheDir ? path.resolve(cacheDir, docId) : path.resolve(__dirname, '../.cache/', docId);
if (fs.existsSync(me._pathToFile)) {
@@ -26,6 +29,24 @@ var cache = {
}
},
get _persisted() {
return this.__persisted;
},
set _persisted(value) {
this.__persisted = value;
this.keyv.set('persisted', value);
},
get _visited() {
return this.__visited;
},
set _visited(value) {
this.__visited = value;
this.keyv.set('visited', value);
},
/**
* Load the cache from the provided file
* @method loadFile