Hi is it possible to exclude specific blocks from being boosted? E.G. "Ajax driven cart"

Comments

mikeytown2’s picture

Status: Active » Closed (works as designed)

Boost works at a lower level then this. It caches the entire page as a html file and serves that. If your looking for something higher up try out http://drupal.org/project/cacherouter http://drupal.org/project/cache http://drupal.org/project/advcache http://drupal.org/project/modules?filters=drupal_core:87%20tid:123&solrs...

mikeytown2’s picture

The alt way is to use javascript to load the block
http://api.drupal.org/api/function/module_invoke

info.php

include_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

$block = module_invoke('statistics', 'block', 'view', 0);
print $block['content'];

put in a block

<div id="info">
</div>
<script>
$('#info').load('/info.php');
</script>

http://api.drupal.org/api/function/statistics_block

Another Example
infoa.php

include_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

$block = module_invoke('user', 'block', 'view', 3);
print $block['content'];

put in a block

<div id="infoa">
</div>
<script>
$('#infoa').load('/infoa.php');
</script>

http://api.drupal.org/api/function/user_block

ckidow’s picture

thanks a lot... that helped me a lot

mikeytown2’s picture

Title: Exclude specific blocks? » Support Shopping carts
Project: Boost » Ajaxify Regions
Version: 6.x-1.0-beta2 » 6.x-1.0
Component: Core compatibility » Miscellaneous
Status: Closed (works as designed) » Active

Don't know if this can handle things like ubercart, throwing it your way.

asak’s picture

Interesting question...

csevb10’s picture

This module is set up to provide a way to make your pages cacheable as flat html without destroying base functionality that should be dynamic.

Basically, this module replaces your default block (be that js, html, flash, whatever) with a js callback to this module. This allows the page to be cached with our js callback in place rather than pre-rendered html. So, for a shopping cart - which is dynamic - the cart would be replaced with a js callback to load the cart html at runtime.

- Default functionality
- Replace dynamic blocks with js callbacks
- Cache html w/ js callbacks

- Load page from cache w/ js callbacks
- Retrieve dynamic block content
- Replace dynamic block content

Let me know if that makes sense.
Hope that helps. Thanks!

csevb10’s picture

I am working on a new release that will support (and is actually specifically intended) for use with shopping carts. It'll handle ajax-loading of non-cacheable and anonymous-dynamic blocks such as the shopping cart block. It'll also support filterable lists for both blocks and pages.

asak’s picture

@csevb10: sounds cool, let us know when there's something to test ;)

csevb10’s picture

Things have now been updated to support shopping carts. I have it built and running on a shopping cart for testing, and, as far as I can tell, everything is working as expected.

csevb10’s picture

Status: Active » Fixed

Fixed in commit #366456

Status: Fixed » Closed (fixed)

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