You are here

function views_custom_cache_plugin_cache::summary_title in Views custom cache 7

Implements views_plugin_cache#summary_title().

Overrides views_plugin_cache::summary_title

File

views/views_custom_cache_plugin_cache.inc, line 18
Views custom cache first argument plugin.

Class

views_custom_cache_plugin_cache
Views caching given view's first argument.

Code

function summary_title() {
  $time = $this
    ->get_time();
  $role = $this->options['per_role'] ? 'Yes' : 'No';
  $entities = isset($this->options['entities']) ? $this->options['entities'] : 'none';
  if ($this->options['cache_time'] == '-1') {
    return t('Never cache');
  }
  elseif ($this->options['cache_time'] == '0') {
    return t('Cache permanent' . ' / ' . t('Per role') . ': ' . $role . ' / ' . t('Updates awareness') . ': ' . $entities);
  }
  else {
    return t('Time') . ': ' . format_interval($time, 1) . ' / ' . t('Per role') . ': ' . $role . ' / ' . t('Updates awareness') . ': ' . $entities;
  }
}