You are here

README.txt in Render cache 7.2

- Enable the module
- Ensure to add the following to your e.g. hook_render_cache_block_cache_info_alter():

/**
 * Implements hook_render_cache_block_cache_info_alter().
 */
function rc_site_render_cache_block_cache_info_alter(&$cache_info, $object, $context) {
  if ($context['module'] == 'rc_site') {
    // Need at least custom granularity for now.
    $cache_info['granularity'] = DRUPAL_CACHE_CUSTOM; 
    $cache_info['render_strategy'][] = 'big_pipe';
  }
}

- If you want to split the html.tpl.php at a different point add a comment to show where to SPLIT:

<!-- X-RENDER-CACHE-BIG-PIPE-SPLIT -->

File

modules/renderer/render_cache_big_pipe/README.txt
View source
  1. - Enable the module
  2. - Ensure to add the following to your e.g. hook_render_cache_block_cache_info_alter():
  3. /**
  4. * Implements hook_render_cache_block_cache_info_alter().
  5. */
  6. function rc_site_render_cache_block_cache_info_alter(&$cache_info, $object, $context) {
  7. if ($context['module'] == 'rc_site') {
  8. // Need at least custom granularity for now.
  9. $cache_info['granularity'] = DRUPAL_CACHE_CUSTOM;
  10. $cache_info['render_strategy'][] = 'big_pipe';
  11. }
  12. }
  13. - If you want to split the html.tpl.php at a different point add a comment to show where to SPLIT: