_views_fetch_data() can be invoked many times. I suggest to use drupal_static_fast pattern for it.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

maximpodorov’s picture

Issue summary: View changes

Any plans to accept this?

Chris Matthews’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

The 5 year old patch to cache.inc does not apply to the latest views 7.x-3.x-dev.

Checking patch includes/cache.inc...
error: while searching for:
 *   One example is views_get_handler.
 */
function _views_fetch_data($table = NULL, $move = TRUE, $reset = FALSE) {
  $cache = &drupal_static(__FUNCTION__ . '_cache');
  $recursion_protection = &drupal_static(__FUNCTION__ . '_recursion_protected');
  $fully_loaded = &drupal_static(__FUNCTION__ . '_fully_loaded');
  if ($reset) {
    $cache = NULL;
    $fully_loaded = FALSE;

error: patch failed: includes/cache.inc:13
error: includes/cache.inc: patch does not apply
Andrew Answer’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
1.02 KB

Patch rerolled.