[pdm-devel] [PATCH datacenter-manager 1/2] ui: dashboard: increase max-age default to 930 seconds
Dominik Csapak
d.csapak at proxmox.com
Fri Sep 5 10:32:46 CEST 2025
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 at 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
More information about the pdm-devel
mailing list