MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / clearNodeInventoryCache

Method clearNodeInventoryCache

internal/cli/cli_helpers.go:112–122  ·  view source on GitHub ↗

clearNodeInventoryCache invalidates API cache entries that affect guest inventory for operations performed outside the Proxmox API client.

(ctx context.Context, nodeName string)

Source from the content-addressed store, hash-verified

110// clearNodeInventoryCache invalidates API cache entries that affect guest
111// inventory for operations performed outside the Proxmox API client.
112func (s *cliSession) clearNodeInventoryCache(ctx context.Context, nodeName string) error {
113 client, err := s.clientForNode(ctx, nodeName)
114 if err != nil {
115 return err
116 }
117
118 client.ClearClusterCache()
119 client.ClearNodeCache(nodeName)
120
121 return nil
122}
123
124// clientForVM returns the API client responsible for the given guest. In group
125// mode it resolves via SourceProfile; in single mode it returns the single client.

Callers 1

Calls 3

clientForNodeMethod · 0.95
ClearClusterCacheMethod · 0.80
ClearNodeCacheMethod · 0.80

Tested by

no test coverage detected