src/Vatsimphp/Sync/AbstractSync.php
protected function saveToCache($data)
    {
        $fh = fopen($this->filePath, 'w');
        if (flock($fh, LOCK_EX)) {
            fwrite($fh, $data);
            flock($fh, LOCK_UN);
        }
        fclose($fh);
        $this->log->debug("Cache file {$this->filePath} saved");
    }
protected function saveToCache($data)
    {
        $fh = fopen($this->filePath, 'w');
        if (flock($fh, LOCK_EX)) {
            fwrite($fh, $data);
            flock($fh, LOCK_UN);
        }
        fclose($fh);
        $this->log->debug("Cache file {$this->filePath} saved");
    }
protected function saveToCache ( $ data ) { $ fh = fopen ( $ this -> filePath , 'w' ) ; if ( flock ( $ fh , LOCK_EX ) ) { fwrite ( $ fh , $ data ) ; flock ( $ fh , LOCK_UN ) ; } fclose ( $ fh ) ; $ this -> log -> debug ( "Cache file {$this->filePath} saved" ) ; }
Atomic save raw data to cache file.

@param string $data
Atomic save raw data to cache file .