Issue #2002964 by markie, borisson_: Rename Views method get_lifespan() to getLifespan().
parent
63d371ad06
commit
7b3a7b2f94
|
@ -97,18 +97,18 @@ class Time extends CachePluginBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function summaryTitle() {
|
public function summaryTitle() {
|
||||||
$results_lifespan = $this->get_lifespan('results');
|
$results_lifespan = $this->getLifespan('results');
|
||||||
$output_lifespan = $this->get_lifespan('output');
|
$output_lifespan = $this->getLifespan('output');
|
||||||
return format_interval($results_lifespan, 1) . '/' . format_interval($output_lifespan, 1);
|
return format_interval($results_lifespan, 1) . '/' . format_interval($output_lifespan, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_lifespan($type) {
|
protected function getLifespan($type) {
|
||||||
$lifespan = $this->options[$type . '_lifespan'] == 'custom' ? $this->options[$type . '_lifespan_custom'] : $this->options[$type . '_lifespan'];
|
$lifespan = $this->options[$type . '_lifespan'] == 'custom' ? $this->options[$type . '_lifespan_custom'] : $this->options[$type . '_lifespan'];
|
||||||
return $lifespan;
|
return $lifespan;
|
||||||
}
|
}
|
||||||
|
|
||||||
function cache_expire($type) {
|
function cache_expire($type) {
|
||||||
$lifespan = $this->get_lifespan($type);
|
$lifespan = $this->getLifespan($type);
|
||||||
if ($lifespan) {
|
if ($lifespan) {
|
||||||
$cutoff = REQUEST_TIME - $lifespan;
|
$cutoff = REQUEST_TIME - $lifespan;
|
||||||
return $cutoff;
|
return $cutoff;
|
||||||
|
@ -119,7 +119,7 @@ class Time extends CachePluginBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
function cache_set_expire($type) {
|
function cache_set_expire($type) {
|
||||||
$lifespan = $this->get_lifespan($type);
|
$lifespan = $this->getLifespan($type);
|
||||||
if ($lifespan) {
|
if ($lifespan) {
|
||||||
return time() + $lifespan;
|
return time() + $lifespan;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue