Created
October 17, 2011 13:42
-
-
Save chrisns/1292631 to your computer and use it in GitHub Desktop.
forces block cache to be enabled with a node_access module present and keys the cache entries by the $_SERVER['HTTP_HOST']
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff U modules/block/block.module block/block.module | |
--- modules/block/block.module Mon Jan 19 22:26:36 1970 | |
+++ modules/block/block.module Mon Jan 19 22:26:36 1970 | |
@@ -515,4 +515 @@ | |
- // Try fetching the block from cache. Block caching is not compatible with | |
- // node_access modules. We also preserve the submission of forms in blocks, | |
- // by fetching from cache only if the request method is 'GET'. | |
- if (!count(module_implements('node_grants')) && $_SERVER['REQUEST_METHOD'] == 'GET' && ($cid = _block_get_cache_id($block)) && ($cache = cache_get($cid, 'cache_block'))) { | |
+ if ($_SERVER['REQUEST_METHOD'] == 'GET' && ($cid = _block_get_cache_id($block)) && ($cache = cache_get($cid, 'cache_block'))) { | |
@@ -576,0 +574 @@ | |
+ $cid_parts[] = $_SERVER["HTTP_HOST"]; | |
diff U modules/system/system.admin.inc system/system.admin.inc | |
--- modules/system/system.admin.inc Mon Jan 19 22:26:36 1970 | |
+++ modules/system/system.admin.inc Mon Jan 19 22:26:36 1970 | |
@@ -1336,2 +1336,2 @@ | |
- '#disabled' => count(module_implements('node_grants')), | |
- '#description' => t('Note that block caching is inactive when modules defining content access restrictions are enabled.'), | |
+// '#disabled' => count(module_implements('node_grants')), | |
+// '#description' => t('Note that block caching is inactive when modules defining content access restrictions are enabled.'), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment