I am using Universal Dashboard to display some automation tests results that get updated by the test agents. I am able to post the results via REST api directly, and get these stored into a cached variable. That is, I post the test info and create a tab, which I add to a cached collection of tabs to use later in the page (code below).
My question is, is there a way to “autoreload” the dashboard so that it creates an updated page with the latest info from the $cached:tabs Array. I use the dashboard as a windows service, so I can restart the service. I’d like to avoid this though, because it takes some time to get up and running and this is sort of a blank space for other results coming.
Hello @EmilT and welcome to the UD forums…I believe the question you ask has already been answered here:- Idle Timeout Issues
Please remember if this does indded resolve your problem please mark this as the solution for future users. Thanks
Thank you guys for the feedback. If I understand correctly, IdleTimeout has to do with extending the cache from expiring? My goal was something more akin the -Autoreload switch, that is the dashboard updating itself when it gets some data (I can hack this by pseudo editing the dashboard.ps1 file but like to think there is a cleaner way).
The main data bearing element is a UDTable, which uses -Content - should I be looking into using -Endpoint here?
Just a random idea, which I have used successfully. Depending on the amount of data, I can “store” the cached data into a serialized json (or xml) file, and read back from it, so cache expiration becomes a non-issue.
To get the data to update in a component such as the grid you need to make sure you use an endpoint and the autoreload and refreshinterval parameters on the endpoint script block. the component will then automatically update