Is there a way to use if command with cache variable

Hi guys
Is there a way to check $cache:variable if it’s updated already by endpoint schedule.

Am using a endpoint schedule with get-service and have [pscustomobject] in place for the service status and am using sync-udelemnt to sync out-griddata
The problem is I have my schedule runs every 10 sec and I cannot degrease the number because it will put a load on processor
When I check the button to start the service in dashboard the status will remain stopped obviously because the cache has not been updated yet based on the 10 sec schedule so sync-udelement is going to check the cached value
What am looking for is after clicking the button update the cache so sync-udelement will grab the actual service status.