[pdm-devel] [PATCH datacenter-manager 1/2] server: api: subscription: improve cache and update behavior
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed Dec 3 21:47:25 CET 2025
Am 03.12.25 um 15:34 schrieb Dominik Csapak:
> To avoid long load times in the ui, use only cached entries for
> subscription info in the GET subscription api call by default, but add a
> 'force-load' parameter to restore the previous behavior.
>
> The check_subscription api call now always load from all remotes to get
> the most up-to-date information from them.
hmm, this gets a bit confusing to me. Renaming the param to "cache-only"
would make that a bit better, as your name suggests that we always load
now, but with that param passed we still use the cache as long as the
age there is below max-age.
That said, I'm not sure this is the route I'd like to go at all, so just
lets not rush it and revisit this in a few days/weeks again.
What I'd probably would prefer is caching the unknown result and early
returning when that is recent enough.
Actually, it might be nice to have a global unknown (or offline) remote
(+ nodes?) cache, where we save when a remote was unknown and if it was
often in a certain time period we skip it from querying at all and short
circuit that to unknown in all places. This naturally needs to be fleshed
out and needs a bit of care, e.g., users should be able to see (and
manually clear) this state.
More information about the pdm-devel
mailing list