Have the server status checker code generate a dynamic filename for each check it does per server. Say tag the end of the canonical name with a timestamp so a check of CS-01 at some time it would generate CS-01-1307842209.png then if it checks 60s later the rendered image would now be called CS-01-1307842269.png etc. After this, write the name of the generated dynamic filename to CS-01-currentname.txt. Then have your VB sidebar template (just add a PHP hook) read CS-01-currentname.txt to get the correct dynamic filename to use in creating the HTML. That would guarantee an uncacheable image since each time the server status gets refreshed, the browser would see an incrementing filename in the rendered HTML from VB and would fetch the up-to-date image. Voila, permanent non-caching! To prevent the proliferation of previously timestamped images, either schedule a deletion of all pngs not currently listed in *-currentname.txt periodically or have the server checker code do it after each update (i.e. server checker reads CS-01-currentname.txt before rewriting it to get the name of the to-be-deleted old png), I leave the exact implementation up to you, the reader-programmer
, but the general idea is sound I think.
Bookmarks