Experimental project

This is a sandbox project, which contains experimental code for developer use only.

General Information

This module is for D6 and manages any blocks or views specified on the module's admin page to be displayed through Akamai's caching servers. When a block/view is rewritten the output in a page is replaced with an Akamai ESI tag similar to:

<esi:include src="/url/to/frag/goes/here" ttl="0s" onerror="continue" />

Then the Akamai ESI proxy will request the block/view "fragment" from the 'src' parameter in the markup tag above. The retrieved fragment is only the content for that block/view without any surrounding page markup since the Akamai servers will render it as part of the original page.

The blocks/views are rendered by using GET args for module, block delta and view args. A cookie is placed on login and reset on logout which is used by this module to set different TTL's for content for anonymous vs. authenticated users. These TTL's are defined on the admin settings page for this module at admin/settings/akamai_esi.

The Akamai CCAPI is used to manage cache clearing. The Akamai account username and password need to be set at admin/settings/akamai_esi/api.

Requirements

This module requires the 'soap client' module to communication with Akamai's Cache Control API (CCAPI).

Usage & Testing

This module requires an active account with Akamai for this to really work for you. You can test 2 different ways without the account:

  1. Install module and turn on some blocks at admin/settings/akamai_esi then visit a page on your with those blocks and 'view source'. You will see the tags in place of your blocks. Then you can copy the 'src' attribute from that tag to view the ESI fragment by pasting the src url into your browser. This shows you the block with no formatting (note: it will get the formatting when the Akamai servers re-assemble the page).
  2. See README.txt for an update in your theme's page template(s) for the Drupal Messages.
  3. You can use Akamai's ESI testing server, called ETS. When you install ETS (available on Akamai's website) then you will be able to see the templates and fragments re-assembled, as intended. If pages do not display correctly you can use the ETS debugging feature by appending '?debug' to the end of the page's url and then viewing html source to see the ETS errors.

NOTE ABOUT ADMIN CONTENT AND CACHING:

This module detects HTTP headers from the Akamai network and uses admin_supress() from Drupal API to prevent admin menus from output to Akamai's CDN.

Credits:

Project information