You are here

function esi_get_modes in ESI: Edge Side Includes 7.3

Get the possible modes of rendering an ESI tag.

See also

hook_esi_mode().

2 calls to esi_get_modes()
esi_admin_configuration_form in ./esi.admin.inc
Menu handler to display the configuration form.
esi_get_tag_render_function in ./esi.module
Get the function callback which is used to render an ESI element for a particular mode (for example, render as ESI vs SSI).

File

./esi.module, line 340
Adds support for ESI (Edge-Side-Include) integration, allowing components\ to be delivered by ESI, with support for per-component cache times.

Code

function esi_get_modes() {
  $modes =& drupal_static(__FUNCTION__);
  if (empty($modes)) {
    if (!($result = cache_get('esi_modes'))) {
      $modes = module_invoke_all('esi_mode');
      drupal_alter('esi_mode', $modes);
      cache_set('esi_mode', $modes);
    }
  }
  return $modes;
}