public function rebuild()
    {
        if (file_exists($this->file)) {
            try {
                $this->data = unserialize(file_get_contents($this->file));
                return true;
            } catch (\Exception $e) {
                // Try just used to suppress the exception. If the cache is corrupted we just start from scratch.
            }
        }

        $this->data = [];
        $this->persist();
        return false;
    }
public function rebuild()
    {
        if (file_exists($this->file)) {
            try {
                $this->data = unserialize(file_get_contents($this->file));
                return true;
            } catch (\Exception $e) {
                // Try just used to suppress the exception. If the cache is corrupted we just start from scratch.
            }
        }

        $this->data = [];
        $this->persist();
        return false;
    }
public function rebuild ( ) { if ( file_exists ( $ this -> file ) ) { try { $ this -> data = unserialize ( file_get_contents ( $ this -> file ) ) ; return true ; } catch ( \ Exception $ e ) { // Try just used to suppress the exception. If the cache is corrupted we just start from scratch. } } $ this -> data = [ ] ; $ this -> persist ( ) ; return false ; }
Try to unserialize the existing cache, if it's corrupted, it's lost, let it go.

@return bool
Try to unserialize the existing cache if it s corrupted it s lost let it go .