protected function writeFile(EntityMetadata $metadata, $contents)
    {
        $file = $this->getCacheFile($metadata->type);
        $tmpFile = tempnam($this->dir, 'metadata-cache');
        file_put_contents($tmpFile, $contents);
        chmod($tmpFile, 0666 & ~umask());
        $this->renameFile($tmpFile, $file);
    }
protected function writeFile(EntityMetadata $metadata, $contents)
    {
        $file = $this->getCacheFile($metadata->type);
        $tmpFile = tempnam($this->dir, 'metadata-cache');
        file_put_contents($tmpFile, $contents);
        chmod($tmpFile, 0666 & ~umask());
        $this->renameFile($tmpFile, $file);
    }
protected function writeFile ( EntityMetadata $ metadata , $ contents ) { $ file = $ this -> getCacheFile ( $ metadata -> type ) ; $ tmpFile = tempnam ( $ this -> dir , 'metadata-cache' ) ; file_put_contents ( $ tmpFile , $ contents ) ; chmod ( $ tmpFile , 0666 & ~ umask ( ) ) ; $ this -> renameFile ( $ tmpFile , $ file ) ; }
Writes the cache file.

@param   EntityMetadata  $metadata
@param   string          $contents
Writes the cache file .