Hi,
I was trying to use views_content_cache on my site, but I had a bug where the content would stay stale. I tracked it down with xdebug, and found out that views_content_cache_id_generate would always return an empty array. I fixed it with a simple 'if' case :
$key_values = $plugin->content_key($object, $object_type);
+ if (!empty($key_values)) {
...
$cids = $processed;
+ }
Basically, when $plugin->content_key returns null, we still enter the inner loop, thus creating an empty array which overrides the '$cids' one here : '$cids = $processed;'. So the functions returns an empty array, where it shouldn't. And so the content stays stale.
Hope it all makes sense. It actually looks very similar (if not the exact same issue) to http://drupal.org/node/1062204
Comments
Comment #1
steven jones commentedFixed in git commit:35940a5de7e91782ec4363e8cd9bb0b5adfc50eb thanks!