My client wants Drupal to keep accurate hit counts for their articles and therefore cannot use Boost for them. However, their tag-based search page is fairly expensive to generate and we would love to use Boost for it. So what I want is to enable Boost for a subset of paths and leave the database-backed page cache enabled for everything else. However, enabling Boost disables the built in page cache complete.

For now this client has moved away from Boost so I am unlikely to implement this in the near term.

CommentFileSizeAuthor
#7 boost-204174.patch10.87 KBmikeytown2
#5 boost-204174.patch8.83 KBmikeytown2

Comments

Arto’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
Component: Code » Core compatibility
Assigned: Unassigned » Arto

I'll likely implement this in the 6.x branch.

mikeytown2’s picture

Assigned: Arto » Unassigned

Need to see if this module can help out.
http://drupal.org/project/cacheexclude

mikeytown2’s picture

Looked at the above module and all it does is set $GLOBALS['conf']['cache'] = FALSE; for pages it doesn't want cached, which corresponds to variable_set('cache', CACHE_DISABLED).

This is inside boost_admin_settings_submit()

  // Forcibly disable Drupal's built-in SQL caching to prevent any conflicts of interest:
  variable_set('cache', CACHE_DISABLED);

Drupal's cache gets set via drupal_page_footer() => page_set_cache(). boost_exit() and _boost_ob_handler() are to late in terms of doing $GLOBALS['conf']['cache'] = TRUE;. Need to see if I can move the drupal_get_headers() out of _boost_ob_handler() and into an earlier stage; via boost_preprocess_page(). Main goal is to enable drupal's cache when boost won't cache that page. Need to see if CACHE_AGGRESSIVE is compatible with boost; it gets evaluated in _drupal_bootstrap(), controls the calling of bootstrap_invoke_all('boot') (hook_boot()), bootstrap_invoke_all('exit') (hook_exit()). Boost has a hoox_exit() call but this only gets bypassed if the cache is set for that page & CACHE_AGGRESSIVE. So my guess is boost is compatible with CACHE_AGGRESSIVE.

Long story short:
Inside new function boost_preprocess_page() IF boost is going to cache page THEN set $GLOBALS['conf']['cache'] = FALSE. Re-enable normal cache settings on performance page.

mikeytown2’s picture

man this is an annoying bug... #484756: Cache strategy

mikeytown2’s picture

Status: Active » Needs review
StatusFileSize
new8.83 KB

here is the initial patch for this

mikeytown2’s picture

More refined patch, decided to enable aggressive caching with boost.

mikeytown2’s picture

StatusFileSize
new10.87 KB
mikeytown2’s picture

Status: Needs review » Fixed

committed.

mikeytown2’s picture

Status: Fixed » Needs work

Display # of pages for each cache & ability to flush entire cache (core or boost) on performance page.

mikeytown2’s picture

Status: Needs work » Fixed

moving additional things to #453426: Merge Cache Static into boost - Create GUI for database operations.
Main issue was fixed so marking this as fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.