lib/Minify/Cache/File.php
public function store($id, $data)
    {
        $flag = $this->locking ? LOCK_EX : null;
        $file = $this->path . '/' . $id;

        if (! @file_put_contents($file, $data, $flag)) {
            $this->logger->warning("Minify_Cache_File: Write failed to '$file'");
        }

        // write control
        if ($data !== $this->fetch($id)) {
            @unlink($file);
            $this->logger->warning("Minify_Cache_File: Post-write read failed for '$file'");

            return false;
        }

        return true;
    }
public function store($id, $data)
    {
        $flag = $this->locking ? LOCK_EX : null;
        $file = $this->path . '/' . $id;

        if (! @file_put_contents($file, $data, $flag)) {
            $this->logger->warning("Minify_Cache_File: Write failed to '$file'");
        }

        // write control
        if ($data !== $this->fetch($id)) {
            @unlink($file);
            $this->logger->warning("Minify_Cache_File: Post-write read failed for '$file'");

            return false;
        }

        return true;
    }
public function store ( $ id , $ data ) { $ flag = $ this -> locking ? LOCK_EX : null ; $ file = $ this -> path . '/' . $ id ; if ( ! @ file_put_contents ( $ file , $ data , $ flag ) ) { $ this -> logger -> warning ( "Minify_Cache_File: Write failed to '$file'" ) ; } // write control if ( $ data !== $ this -> fetch ( $ id ) ) { @ unlink ( $ file ) ; $ this -> logger -> warning ( "Minify_Cache_File: Post-write read failed for '$file'" ) ; return false ; } return true ; }
Write data to cache.

@param string $id cache id (e.g. a filename)

@param string $data

@return bool success
Write data to cache .