Cache dynamic content for eight hours, not one
This commit is contained in:
parent
78f4c4992f
commit
f25a2a07db
@ -246,8 +246,8 @@ function getDynamicPageContent(page) {
|
||||
// update dynamic page text cache
|
||||
setTimeout(function () {
|
||||
dynamicPages.forEach(function (pageid) {
|
||||
// Only update if it's been over an hour since last update
|
||||
if (!inStorage("dynamiccontent-lastupdated_" + pageid) || getStorage("dynamiccontent-lastupdated_" + pageid) < time() - 60 * 60) {
|
||||
// Only update if it's been over eight hours since last update
|
||||
if (!inStorage("dynamiccontent-lastupdated_" + pageid) || getStorage("dynamiccontent-lastupdated_" + pageid) < time() - 60 * 60 * 8) {
|
||||
apirequest(SETTINGS.apis.dynamicappcontent, {page: pageid}, function (resp) {
|
||||
if (resp.status == "OK") {
|
||||
setStorage("dynamiccontent_" + resp.page, resp.content);
|
||||
|
Loading…
x
Reference in New Issue
Block a user