private function write($key, array $data)
    {
        $fname = $this->getObjectPath($key);
        $content = serialize($data);
        $path = dirname($fname);
        if (!file_exists($path) && !mkdir($path, 0755, true)) {
            throw new \RuntimeException('Unable to create directory for cache');
        }
        file_put_contents($fname, $content);
    }
private function write($key, array $data)
    {
        $fname = $this->getObjectPath($key);
        $content = serialize($data);
        $path = dirname($fname);
        if (!file_exists($path) && !mkdir($path, 0755, true)) {
            throw new \RuntimeException('Unable to create directory for cache');
        }
        file_put_contents($fname, $content);
    }
private function write ( $ key , array $ data ) { $ fname = $ this -> getObjectPath ( $ key ) ; $ content = serialize ( $ data ) ; $ path = dirname ( $ fname ) ; if ( ! file_exists ( $ path ) && ! mkdir ( $ path , 0755 , true ) ) { throw new \ RuntimeException ( 'Unable to create directory for cache' ) ; } file_put_contents ( $ fname , $ content ) ; }
Write cache object to a file

@param string $key
@param array $data

@throws \RuntimeException
Write cache object to a file