aboutsummaryrefslogtreecommitdiff
path: root/src/modules/requests.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/requests.js')
-rw-r--r--src/modules/requests.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/modules/requests.js b/src/modules/requests.js
index 94639fa..a67bc26 100644
--- a/src/modules/requests.js
+++ b/src/modules/requests.js
@@ -27,6 +27,12 @@ function _getRequestsCache() {
}
}
+function delete_cache() {
+ if (fs.existsSync(cachePath)) {
+ return fs.rmSync(cachePath);
+ }
+}
+
// Returns latest Northstar version available from GitHub releases. If
// there's no cache result for this request, or if cache exists but is
// old, refreshes cache with new data.
@@ -182,6 +188,7 @@ async function getVpReleaseNotes() {
}
module.exports = {
+ delete_cache,
getLatestNsVersion,
getLatestNsVersionLink,
getNsReleaseNotes,