You are here

function domain_views_plugin_cache_time::get_output_key in Domain Views 7

Overrides views_plugin_cache::get_output_key

File

includes/domain_views_plugin_cache_time.inc, line 37
Domain Views plugin that caches views on a per domain basis. This is necessary for views that filter on "current domain" (ex. SELECT * FROM {node} WHERE domain_source = current_domain) otherwise "current domain" will be cached.

Class

domain_views_plugin_cache_time
Cache plugin that provides caching on a per domain basis.

Code

function get_output_key() {

  /**
   * Create an md5 hashed key including the current domain
   * to use as the cache key for caching the views output.
   */
  if (!isset($this->_output_key)) {
    $key_data = array(
      'theme' => $GLOBALS['theme'],
    );

    // Match the results key.
    $this->_output_key = $this->view->name . ':' . $this->display->id . ':output:' . $this
      ->get_cache_key($key_data);
  }
  return $this->_output_key;
}