Dynamically populate validateset on a function

Product: PowerShell Universal
Version: 1.4.6

Kind of a weird question but is it possible to dynamically load a param using an object in psu cache for a param?

param (
    [Parameter(Mandatory = $true, HelpMessage = "Name of task you want to create.")]
    [ValidateScript({
        Get-PSUCache -Key "Packages" -ErrorAction Ignore
    })]
    $PackageID,

    [Parameter(Mandatory = $true, HelpMessage = "Name of task you want to create.")]
    [string]
    $TaskName
)

so we could have the param run the code to get the object in memory and put the data in the [ValidateSetAttribute("item1","item2")]

This way we could have a script load some data in cache and another script the user could fill in the params by the dropdown that PSU gives you from the validateset

Maybe its something along the lines of Register-ArgumentCompleter (Microsoft.PowerShell.Core) - PowerShell | Microsoft Learn

@adam