Closed (fixed)
Project:
Nodeblock
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Feb 2015 at 16:16 UTC
Updated:
26 Jun 2015 at 13:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
idebr commentedAttached patch expands nodeblock_block_info to return a cache setting on its blocks. The default for blocks without a cache strategy is DRUPAL_CACHE_PER_ROLE, so this change can be applied without breaking any sites currently using Nodeblock.
Comment #3
Johnny vd Laar commentedI've taken a different approach for this. I check whether there are node_grants implementing modules. If so then caching is disabled otherwise the caching is per role.
Only problem now is that there might also be modules implementing hook_node_access and do special stuff...
So perhaps it should always be DRUPAL_NO_CACHE. But it feels a bit strange to disable caching entirely while in most cases the block can be cached.
http://cgit.drupalcode.org/nodeblock/commit/?id=55d2ef1
Comment #4
Johnny vd Laar commentedOk I've added a variable such that you can override cachability if you want to. And I added info in the readme to make sure everyone understands that it's dangerous to do so.
http://cgit.drupalcode.org/nodeblock/commit/?id=e76ab98
Thanks for the help!