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:
@@ -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,
|
||||
};
|
||||
|
Reference in New Issue
Block a user