function views_custom_cache_plugin_cache::get_output_key in Views custom cache 7
Implements views_plugin_cache#get_output_key().
Overrides views_plugin_cache::get_output_key
File
- views/
views_custom_cache_plugin_cache.inc, line 160 - Views custom cache first argument plugin.
Class
- views_custom_cache_plugin_cache
- Views caching given view's first argument.
Code
function get_output_key() {
$per_role = isset($this->options['per_role']) ? $this->options['per_role'] : 1;
$entities = isset($this->options['entities']) ? $this->options['entities'] : 'none';
$bundles = isset($this->options['bundles']) ? $this->options['bundles'] : array();
if (!isset($this->_output_key)) {
$key_data = array(
'theme' => $GLOBALS['theme'],
);
$this->_output_key = $this->view->name . ':' . $this->display->id . ':output:' . $this
->get_first_arg();
if ($per_role) {
$this->_output_key .= ':' . $this
->get_cache_key($key_data);
}
if (!empty($entities) && $entities == 'node') {
$last_changed = $this
->node_get_last_changed_date($bundles);
$this->_output_key .= ':' . $last_changed;
}
}
return $this->_output_key;
}