web-spider
Version:
web-spider is a simple and fast web spider written with Nodejs!
20 lines (14 loc) • 490 B
JavaScript
const path = require('path');
const fs = require('fs');
const stringUtil = require('../src/common/stringUtil');
let cache = require('../src/cache');
let _cache = new cache.SimpleCache();
_cache.set(1,"b");
_cache.get(1);
console.log(_cache.size);
console.log(_cache.get(2));
var pathJson = path.resolve(__dirname, './phantom-config.json');
var contentText = fs.readFileSync(pathJson,'utf-8');
console.log(contentText);
var map = new cache.SimpleCache(pathJson);
console.log(map.size);