1
0
mirror of https://github.com/trambarhq/relaks-wordpress-example.git synced 2025-09-02 12:42:38 +02:00

Extended cached valid time (issue #41).

Implemented periodically invalidation (issue #37).
This commit is contained in:
Chung Leong
2019-01-30 10:39:03 +01:00
parent 3e60897e8c
commit 4b34ab39cd
9 changed files with 140 additions and 16 deletions

View File

@@ -33,6 +33,13 @@ async function generate(path, target) {
return { path, target, sourceURLs, html };
}
async function prefetch(path) {
console.log(`Regenerating page: ${path}`);
let url = NGINX_HOST + path;
return CrossFetch(url);
}
module.exports = {
generate,
prefetch,
};