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.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | boost-204174.patch | 10.87 KB | mikeytown2 |
| #5 | boost-204174.patch | 8.83 KB | mikeytown2 |
Comments
Comment #1
Arto commentedI'll likely implement this in the 6.x branch.
Comment #2
mikeytown2 commentedNeed to see if this module can help out.
http://drupal.org/project/cacheexclude
Comment #3
mikeytown2 commentedLooked 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()
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.
Comment #4
mikeytown2 commentedman this is an annoying bug... #484756: Cache strategy
Comment #5
mikeytown2 commentedhere is the initial patch for this
Comment #6
mikeytown2 commentedMore refined patch, decided to enable aggressive caching with boost.
Comment #7
mikeytown2 commentedComment #8
mikeytown2 commentedcommitted.
Comment #9
mikeytown2 commentedDisplay # of pages for each cache & ability to flush entire cache (core or boost) on performance page.
Comment #10
mikeytown2 commentedmoving additional things to #453426: Merge Cache Static into boost - Create GUI for database operations.
Main issue was fixed so marking this as fixed.