You are here

function views_plugin_cache::cache_start in Views (for Drupal 7) 6.3

Same name and namespace in other branches
  1. 6.2 plugins/views_plugin_cache.inc \views_plugin_cache::cache_start()
  2. 7.3 plugins/views_plugin_cache.inc \views_plugin_cache::cache_start()

Start caching javascript, css and other out of band info.

This takes a snapshot of the current system state so that we don't duplicate it. Later on, when gather_headers() is run, this information will be removed so that we don't hold onto it.

1 method overrides views_plugin_cache::cache_start()
views_plugin_cache_none::cache_start in plugins/views_plugin_cache_none.inc
Start caching javascript, css and other out of band info.

File

plugins/views_plugin_cache.inc, line 179

Class

views_plugin_cache
The base plugin to handle caching.

Code

function cache_start() {
  $this->storage['head'] = drupal_set_html_head();
  $this->storage['css'] = drupal_add_css();
  foreach (array(
    'header',
    'footer',
  ) as $scope) {
    $this->storage['js'][$scope] = drupal_add_js(NULL, NULL, $scope);
  }
}