? boost.drush.inc
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.130
diff -u -r1.1.2.1.2.3.2.130 boost.admin.inc
--- boost.admin.inc 24 Jan 2010 18:25:46 -0000 1.1.2.1.2.3.2.130
+++ boost.admin.inc 17 Jul 2010 22:45:30 -0000
@@ -812,6 +812,34 @@
'#description' => t('Do not warn about missing or modified boost rules in the .htaccess file on the status report page. Enable this if you have a good reason to modify the boost rules in .htaccss.', array('!link' => url('admin/reports/status'))),
);
+ if (module_exists('views')) {
+ $all_views = views_get_all_views();
+ $views_keys = array();
+ foreach($all_views as $name => $view) {
+ $views_keys[$name] = array();
+ $views_displays = (array) $view->display;
+ unset ($views_displays['default']); // default views don't have paths, so won't get cached anyway
+ foreach($views_displays as $display_id => $display) {
+ $views_keys[$name]['boost_views_exclude_display_' . $name . '_' . $display_id] = $display->display_title;
+ }
+ }
+ $form['views'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Views and Boost Cache Relationships'),
+ '#description' => t("Select the views displays to exclude from the {boost_cache_relationships} database table. Note that this does NOT prevent the views and their displays themselves from getting cached by Boost. This only relates to Boost's Database & File Cache section below."),
+ '#collapsible' => TRUE,
+ '#collapsed' => TRUE,
+ );
+ foreach ($views_keys as $view_name => $displays) {
+ $form['views']['boost_views_exclude_display_' . $view_name] = array(
+ '#type' => 'checkboxes',
+ '#title' => $view_name,
+ '#default_value' => variable_get('boost_views_exclude_display_' . $view_name, array()),
+ '#options' => $displays,
+ );
+ }
+ }
+
// Clear database button
$form['clear'] = array(
'#type' => 'fieldset',
Index: boost.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boost/boost.module,v
retrieving revision 1.3.2.2.2.5.2.298
diff -u -r1.3.2.2.2.5.2.298 boost.module
--- boost.module 24 Jan 2010 18:37:55 -0000 1.3.2.2.2.5.2.298
+++ boost.module 17 Jul 2010 22:45:32 -0000
@@ -151,7 +151,9 @@
* reference to the view being worked on
*/
function boost_views_pre_render(&$view) {
- if (!is_null($view) && $GLOBALS['_boost_cache_this'] && !BOOST_NO_DATABASE) {
+ $excluded_displays = variable_get('boost_views_exclude_display_' . $view->name, array());
+ $display_excluded = in_array('boost_views_exclude_display_' . $view->name . '_' . $view->current_display, $excluded_displays, TRUE);
+ if (!is_null($view) && $GLOBALS['_boost_cache_this'] && !$display_excluded && !BOOST_NO_DATABASE) {
foreach ($view->result as $item) {
if (is_numeric($item->nid)) {
$node = node_load($item->nid);