Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 0ef0bf6

Browse files
committed
add deleteCache method
1 parent c266a06 commit 0ef0bf6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/include/file-config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,13 @@ class fileConfig extends config {
9999
if (!this.localExists()) fs.appendFileSync(this.local, '');
100100
}
101101

102+
_cacheDelete(key) {
103+
let file = Fs.join(this.dir, hash(key));
104+
if (!fs.existsSync(file)) return false;
105+
106+
return fs.unlinkSync(file);
107+
}
108+
102109
_cacheGet(key) {
103110
let file = Fs.join(this.dir, hash(key));
104111
if (!fs.existsSync(file)) return false;

0 commit comments

Comments
 (0)