Work with page cache, not instead of it
bjaspan - December 27, 2007 - 13:27
| Project: | Boost |
| Version: | 6.x-1.x-dev |
| Component: | Core compatibility |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
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.

#1
I'll likely implement this in the 6.x branch.
#2
Need to see if this module can help out.
http://drupal.org/project/cacheexclude
#3
Looked at the above module and all it does is set
$GLOBALS['conf']['cache'] = FALSE;for pages it doesn't want cached, which corresponds tovariable_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.
#4
man this is an annoying bug... #484756: Page Cache
#5
here is the initial patch for this
#6
More refined patch, decided to enable aggressive caching with boost.
#7
#8
committed.
#9
Display # of pages for each cache & ability to flush entire cache (core or boost) on performance page.
#10
moving additional things to #453426: Merge Cache Static into boost - Create GUI for database operations.
Main issue was fixed so marking this as fixed.
#11
Automatically closed -- issue fixed for 2 weeks with no activity.