Closed (works as designed)
Project:
Block Cache Alter
Version:
6.x-1.4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Feb 2011 at 19:58 UTC
Updated:
23 Feb 2011 at 22:10 UTC
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
Comment #1
swentel commentedNope, 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.