public function setCheckExpiry() { try { $this->expired = false; $this->cacheFile->put(Carbon::now()->getTimestamp()); } catch (IOException $e) { // Something went wrong } }