from _blockcache_alter_get_cache_id() in blockcache_alter.module

    // 'PER_ROLE' and 'PER_USER' are mutually exclusive. 'PER_USER' can be a
    // resource drag for sites with many users, so when a module is being
    // equivocal, we favor the less expensive 'PER_ROLE' pattern.
    if ($block->cache & BLOCK_CACHE_PER_ROLE) {
      $cid_parts[] = 'r.'. implode(',', array_keys($user->roles));
    }
    elseif ($block->cache & BLOCK_CACHE_PER_USER) {
      $cid_parts[] = "u.$user->uid";
    }

    if ($block->cache & BLOCK_CACHE_PER_PAGE) {
      $cid_parts[] = $base_root . request_uri();
    }

The & should be replaced with && operators, right? Or is this a special PHP operator?

Comments

swentel’s picture

Status: Active » Closed (works as designed)

Nope, those are bitwise operators, see http://php.net/manual/en/language.operators.bitwise.php
That code is also directly copied from the core block module.