From: Dominik Csapak <d.csapak@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH datacenter-manager 1/2] ui: dashboard: increase max-age default to 930 seconds
Date: Fri, 5 Sep 2025 10:32:46 +0200 [thread overview]
Message-ID: <20250905083253.1242076-1-d.csapak@proxmox.com> (raw)
our backend refreshes the metrics with a 15 minute interval, so
using a lower max-age will always refresh it then which is not the point
of the caching mechanism.
Use a slightly higher value than 15 minutes so we mostly use the cached
information.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
ui/src/dashboard/mod.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ui/src/dashboard/mod.rs b/ui/src/dashboard/mod.rs
index cfee55b..9d65122 100644
--- a/ui/src/dashboard/mod.rs
+++ b/ui/src/dashboard/mod.rs
@@ -55,7 +55,8 @@ mod tasks;
use tasks::TaskSummary;
/// The default 'max-age' parameter in seconds.
-pub const DEFAULT_MAX_AGE_S: u64 = 60;
+// backend refreshes resources every 15 minutes so use that +30 seconds as a buffer
+pub const DEFAULT_MAX_AGE_S: u64 = 930;
/// The default refresh interval
pub const DEFAULT_REFRESH_INTERVAL_S: u64 = DEFAULT_MAX_AGE_S / 2;
--
2.47.2
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
next reply other threads:[~2025-09-05 8:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-05 8:32 Dominik Csapak [this message]
2025-09-05 8:32 ` [pdm-devel] [PATCH datacenter-manager 2/2] ui: dashboard: make refresh button force the update Dominik Csapak
2025-09-05 12:26 ` [pdm-devel] [PATCH datacenter-manager 1/2] ui: dashboard: increase max-age default to 930 seconds Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250905083253.1242076-1-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pdm-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.