How do I not cache dynamic content but cache everything else (or similar workaround)? I have a production site with page caching enabled (this is not negotiable). One very popular feature requires dynamic content to be queried from an external socket and displayed; this content is required to be fresh at all times and cannot be cached. Current implementation has a vanilla, non-Drupal .php script polling the socket, whose output is either pulled into the page via javascript, or put in an iframe if no js. The vanilla .php is not cached by Drupal, but the rest of the page (menus etc.) is cached. It's fast.

Due to new requirements, the hard-coded config in the vanilla .php must instead be configurable through the Drupal UI. I have a working admin implementation, and have brought the socket-polling code inside the Drupal module. It's slow. 

Putting the dynamic content in a block with DRUPAL_NO_CACHE doesn't help, because the whole page is being cached, ignoring block-level settings. Excluding the whole page (including menus etc.) from the cache will not meet performance requirements. I don't think I can use the javascript/iframe trick again, unless there's a way to get Drupal to render a minimal uncached page without building any of the rest of the site. Using 'print $my_html;' in the hook_block_view rather than 'return $my_html;' renders a page with just the dynamic content, but it performs slowly enough that I think Drupal is doing a lot of unnecessary work. Is there a better way of rendering a very-minimal page while still having access to e.g. variable_get()?

Is there a better way to approach this? Being able to set block caching independently of its parent page caching would be nice...

(Using local dev servers, a fully uncached page takes about 1000ms to render. The 'minimal print-don't-return' page takes about 400ms. The actual module code for getting the dynamic content takes 6ms of this. A fully cached page renders in 20ms.)
"unless there's a way to get Drupal to render a minimal uncached page without building any of the rest of the site"

There's the clue - yes, there is. This is what AJAX callbacks do, after all. In your menu callback you print the desired output instead of returning it, and return NULL. IIRC, the result won't be subject to page caching either, but if it is, you can use the cache exclude module to ensure it is not cached.