Messages and notifications are rarely re-used within a site. For a site with a high number of these, it is endlessly cached to only be retrieved for a single user on specific pages. This can lead to a very large number of evictions when using Memcached with only minimal benefit.

Example code (don't have time for a patch at the moment) -

function commons_entity_info_alter(&$entity_info) {
   // Disable because of the number of notifications and lack of reuse
   $entity_info['message']['entity cache'] = FALSE;
   $entity_info['message_type']['entity cache'] = FALSE;
}

Comments

ezra-g’s picture

Thanks for this - We'll dig in here!