Hi @all,

I was jsut wondering why my views content cache is not cleared on selected node type updates. After searching the code, I found, that the following function ALWAYS returns no cids when not in a group context:

function views_content_cache_id_generate($object, $object_type) {
  $cids = array(array());
  foreach (views_content_cache_get_plugin() as $key_id => $plugin) {
    $key_values = $plugin->content_key($object, $object_type);
    $key_values = is_array($key_values) ? $key_values : array($key_values);
    // If the content key is multivalue create an additional cid per value.
    $processed = array();
    foreach ($key_values as $key_value) {
      foreach ($cids as $cid) {
        $cid[$key_id] = $key_value;
        $processed[] = $cid;
      }
    }
    $cids = $processed;
  }
  return $cids;
}

It loops over every cache plugin and the first one (by node type) creates a list of cids, but it is directly overriden by the next cache plugin in the loop (by og).

Is this a wanted behavior or is this a bug?

Thanx in advance & cheers

hctom

Comments

hctom’s picture

Title: views_content_cache_id_generate does never return cids when og module is enabled » views_content_cache_id_generate does never return cids when og module is enabled and not in og context
steven jones’s picture

Status: Active » Closed (duplicate)

Thanks for the report, going to handle over at: #1077304: Bug in views_content_cache_id_generate