The Domain module was in fact responsible for this. I moved include './sites/all/modules/domain/settings.inc';
to the very end of my settings.php
file and everything started working.
I then added the following code to ensure a different cache_prefix for each of the domains.
$thishost = $_SERVER['HTTP_HOST'];
$site_arr = explode('.', $thishost);
$sitename = $site_arr[1] . '_';
$conf['cache_prefix'] = $sitename;
Credit for that code goes to Drupal 6 APC with domain access module not working for (sub-)domainsDrupal 6 APC with domain access module not working for (sub-)domains. In fact, now that I look at that page again, I notice that he has the domain access include on the last time, too. Audible sigh. Don't know how I didn't notice that before.
It also appears that if you want to move Domain's settings.inc to the bottom, you need to make a tweak to that file. Modify modules/domain/settings.inc
so the domain_settings_setup_ok
function looks like this:
function domain_settings_setup_ok() {
static $state = NULL;
if ($state === NULL) {
if (!empty($conf['cache_include'])) {
$state = TRUE;
}
else {
$state = !function_exists('cache_get');
}
}
return $state;
}
That is an adapted version of the patch for D7 discussed at https://drupal.org/node/1240472.