I now see 'session' appearing in the bin entries 3 times, which I assume to be heading in the right direction. I have the following code fire on hook_init:
// if there is no key use the user info
if (!$key) {
if (is_object($user) && $user->sid) $key = $user->sid;
else return;
drupal_set_message('user=' . $key);
}
if (($sessionData = dmemcache_get($key, 'session')) == NULL) {
drupal_set_message('Memcache write: ' . ($mw = dmemcache_set($key, $user, 60, 'session')) ? 'success' : 'fail');
$sessionData = dmemcache_get($key, 'session');
}
drupal_set_message('<pre>' . print_r($sessionData,1) . '</pre>');
So basically if the current session is not cached (the read comes back empty), I have memcache set it and read it again. The second read is successful. However, reloading the page Always displays 'success', which means the write is always occurring, which means the cache retrieval is failing either because I'm doing it wrong or because it's not really cached (though I don't know why the second read would work each time).
Of course, I don't want to request the session to be cached.. it should be automatic.