[pdm-devel] [PATCH datacenter-manager 0/3] refactor api caching & try to reuse the cache

Dominik Csapak d.csapak at proxmox.com
Mon Oct 13 10:33:31 CEST 2025


This series introduces a small refactored struct to access the api cache
(like we used for resources + subscription) so that we don't have to
repeat the same way for every bit of data we want to cache.

It also shows how we can add a mechanism to live update this cache
for e.g. pve resources api call and utilize it when the
remote is not reachable

Dominik Csapak (3):
  server: api: resources: change use of remote to reference
  server: introduce ApiCache abstraction
  api/ui: pve: get cluster resources from cache if remote is unreachable

 lib/pdm-client/src/lib.rs                    |  10 +-
 server/src/api/pve/mod.rs                    |  48 ++++--
 server/src/api/resources.rs                  | 165 +++++--------------
 server/src/api_cache.rs                      |  87 ++++++++++
 server/src/lib.rs                            |   1 +
 server/src/metric_collection/top_entities.rs |   2 +-
 ui/src/pve/mod.rs                            |  14 +-
 7 files changed, 179 insertions(+), 148 deletions(-)
 create mode 100644 server/src/api_cache.rs

-- 
2.47.3





More information about the pdm-devel mailing list