Putting this here so I can find it if I ever need it again. I'm caching my WordPress site, but want to be able to rotate ads in the sidebar. Drop this code into a widget:
 $path = plugins_url( 'uncached-page.php', __FILE__ );

echo '<div id="'.$widget_id.'_container">';
echo '<script language="javascript">jQuery(window).load(function () {
jQuery('#'.$widget_id.'_container').load(''.$path.'', {
';
foreach( $args as $k => $v ){
echo "$k: '$v',";
}
echo "
single-config-value: '".$config-value."'
});
});</script>";
echo '</div>';

After the page loads, jQuery will inject the contents of uncached-page.php into the "widget_id_container" div.