You are here

public function views_plugin_cache::cache_start in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 6.3 plugins/views_plugin_cache.inc \views_plugin_cache::cache_start()
  2. 6.2 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 190
Definition of views_plugin_cache.

Class

views_plugin_cache
The base plugin to handle caching.

Code

public function cache_start() {
  $this->storage['head'] = drupal_add_html_head();
  $this->storage['css'] = drupal_add_css();
  $this->storage['js'] = drupal_add_js();
  $this->storage['headers'] = drupal_get_http_header();
}