Well, yes, they are. Unfortunately there’s only one number you can configure. This number tells the agent how often to create the data (which you want to set to “every time”), and it tells the server how long the data is valid. In your setup the server will most likely never see valid data, so the service goes stale. I believe that part to be correct behavior.
What you want to achieve, really, is to create the data often, but then have it valid for just a bit more than a check interval.
I’d say we should change the
sed -e "/^<<</! s/^/$CACHE_INFO /" "$CACHEFILE" line in the agents’
run_cached, such that the “$CACHE_INFO” prefix is only written, if not already present.
This would allow your local check to write it itself, allowing for a longer validity interval, while still being executed more often.
(I think in the long run the caching mechanism should be redesigned to allow a de-coupling of the actual caching, and execotion method. We can see clearly in this case caching is not even desired, we just want to have it executed asynchronously.)