class UltimateCronCacheLogEntry in Ultimate Cron 7.2
Class for using cache as storage for log entries.
Hierarchy
- class \UltimateCronLogEntry
- class \UltimateCronCacheLogEntry
Expanded class hierarchy of UltimateCronCacheLogEntry
File
- plugins/
ultimate_cron/ logger/ cache.class.php, line 86 - Cache logger for Ultimate Cron.
View source
class UltimateCronCacheLogEntry extends UltimateCronLogEntry {
/**
* Save log entry.
*/
public function save() {
if (!$this->lid) {
return;
}
if ($this->log_type != ULTIMATE_CRON_LOG_TYPE_NORMAL) {
return;
}
$job = _ultimate_cron_job_load($this->name);
$settings = $job
->getSettings('logger');
$expire = $settings['timeout'] > 0 ? time() + $settings['timeout'] : $settings['timeout'];
cache_set('uc-name:' . $this->name, $this->lid, $settings['bin'], $expire);
cache_set('uc-lid:' . $this->lid, $this
->getData(), $settings['bin'], $expire);
}
}