? boost-305071.patch Index: boost.admin.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/boost/boost.admin.inc,v retrieving revision 1.1.2.1.2.3.2.103 diff -u -p -r1.1.2.1.2.3.2.103 boost.admin.inc --- boost.admin.inc 2 Nov 2009 18:45:07 -0000 1.1.2.1.2.3.2.103 +++ boost.admin.inc 2 Nov 2009 20:55:23 -0000 @@ -415,12 +415,12 @@ function boost_admin_boost_performance_p ); $form['advanced']['boost_flush_menu_items'] = array( '#type' => 'radios', - '#title' => t('Clear all cached pages in a menu on an insert/update/delete opperation'), + '#title' => t('Clear all cached pages in a menu on an insert/update/delete operation'), '#default_value' => BOOST_FLUSH_MENU_ITEMS, '#description' => t('This can flush a lot of pages depending on your menu structure.'), '#options' => array( 0 => t('Disabled'), - 1 => t('Only Flush Menu Parrents, Siblings & Children'), + 1 => t('Only Flush Menu Parents, Siblings & Children'), 2 => t('Flushes Entire Menu Tree'), ), ); @@ -466,6 +466,12 @@ function boost_admin_boost_performance_p '#default_value' => BOOST_DISABLE_CLEAN_URL, '#description' => t('Drupal will output non clean url\'s for non anonymous users. This allows for the browser to cache the page and still have logging in work. This is more on the extreme side of tweaks.'), ); + $form['advanced']['boost_browser_cache_off'] = array( + '#type' => 'checkbox', + '#title' => t('Set meta tags to disable browser cache for logged in users'), + '#default_value' => BOOST_BROWSER_CACHE_OFF, + '#description' => t('Fix for rare bug in which logged in user that just logged out gets the logged in page after hitting the logout link.'), + ); if (BOOST_GZIP) { $form['advanced']['boost_aggressive_gzip'] = array( '#type' => 'checkbox', Index: boost.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/boost/boost.module,v retrieving revision 1.3.2.2.2.5.2.222 diff -u -p -r1.3.2.2.2.5.2.222 boost.module --- boost.module 2 Nov 2009 18:45:07 -0000 1.3.2.2.2.5.2.222 +++ boost.module 2 Nov 2009 20:55:24 -0000 @@ -72,6 +72,7 @@ define('BOOST_OVERWRITE_FILE', var define('BOOST_HALT_ON_ERRORS', variable_get('boost_halt_on_errors', FALSE)); define('BOOST_HALT_ON_MESSAGES', variable_get('boost_halt_on_messages', TRUE)); define('BOOST_DISABLE_CLEAN_URL', variable_get('boost_disable_clean_url', FALSE)); +define('BOOST_BROWSER_CACHE_OFF', variable_get('boost_browser_cache_off', FALSE)); define('BOOST_AGGRESSIVE_GZIP', BOOST_GZIP ? variable_get('boost_aggressive_gzip', TRUE) : FALSE); define('BOOST_PERMISSIONS_FILE', variable_get('boost_permissions_file', '')); define('BOOST_PERMISSIONS_DIR', variable_get('boost_permissions_dir', '')); @@ -265,6 +266,27 @@ function boost_exit($destination = NULL) } /** + * Implementation of template_preprocess_page(). + * + * Add in do not cache meta tags if desired + * + * @param &$variables + * Array containing various page elements. + * + * TODO: use NODEWORDS_HTTP_EQUIV if module installed instead of this hook. + */ +function boost_preprocess_page(&$variables) { + global $user; + $meta = array(); + // Pragma is obsolete for http/1.1 + if (BOOST_BROWSER_CACHE_OFF && !empty($user->uid)) { + $meta[] = '' . "\n"; + $meta[] = '' . "\n"; + } + $variables['head'] .= implode('', $meta); +} + +/** * Implementation of hook_menu(). */ function boost_menu() {