/** * @return wfWAFCronEvent|bool */ public function reschedule() { $waf = $this->getWaf(); if (!$waf) { return false; } $newEvent = new self(time() + 86400 * ($waf->getStorageEngine()->getConfig('isPaid') ? 0.5 : 7)); if ($this->response) { $headers = $this->response->getHeaders(); if (isset($headers['Expires'])) { $timestamp = strtotime($headers['Expires']); // Make sure it's at least 2 hours ahead. if ($timestamp && $timestamp > time() + 7200) { $newEvent->setFireTime($timestamp); } } } return $newEvent; }