From 74292cd0625032180b2d178ae1c57e51462f121e Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 19 Aug 2007 08:08:45 +0000 Subject: - Patch #80951 by killes, yched et al: block caching. --- modules/user/user.module | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'modules/user/user.module') diff --git a/modules/user/user.module b/modules/user/user.module index fdce324ab..9f2686722 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -627,10 +627,19 @@ function user_block($op = 'list', $delta = 0, $edit = array()) { if ($op == 'list') { $blocks[0]['info'] = t('User login'); + // Not worth caching. + $blocks[0]['cache'] = BLOCK_NO_CACHE; + $blocks[1]['info'] = t('Navigation'); + // Menu blocks can't be cached because each menu item can have + // a custom access callback. menu.inc manages its own caching. + $blocks[1]['cache'] = BLOCK_NO_CACHE; + $blocks[2]['info'] = t('Who\'s new'); - $blocks[3]['info'] = t('Who\'s online'); + // Too dynamic to cache. + $blocks[3]['info'] = t('Who\'s online'); + $blocks[3]['cache'] = BLOCK_NO_CACHE; return $blocks; } else if ($op == 'configure' && $delta == 2) { -- cgit v1.2.3