You are here

function domain_views_plugin_cache_time::get_results_key in Domain Views 7

Overrides views_plugin_cache::get_results_key

File

includes/domain_views_plugin_cache_time.inc, line 24
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_results_key() {

  /**
   * Create an md5 hashed key including the current domain
   * to use as the cache key for caching the views results.
   */
  if (!isset($this->_results_key)) {

    // Set the results key.
    $this->_results_key = $this->view->name . ':' . $this->display->id . ':results:' . $this
      ->get_cache_key();
  }
  return $this->_results_key;
}