src/Common/Service/FileCache/Driver.php
public function write($mData, string $sKey = null): Item
    {
        //  Generate a key if one isn't explicitly specified
        if (is_null($sKey)) {
            $sKey = md5(microtime(true));
        }

        $sPath = $this->prepKey($sKey);

        file_put_contents($sPath, $mData);

        return $this->newItem($sKey);
    }
public function write($mData, string $sKey = null): Item
    {
        //  Generate a key if one isn't explicitly specified
        if (is_null($sKey)) {
            $sKey = md5(microtime(true));
        }

        $sPath = $this->prepKey($sKey);

        file_put_contents($sPath, $mData);

        return $this->newItem($sKey);
    }
public function write ( $ mData , string $ sKey = null ) : Item { //  Generate a key if one isn't explicitly specified if ( is_null ( $ sKey ) ) { $ sKey = md5 ( microtime ( true ) ) ; } $ sPath = $ this -> prepKey ( $ sKey ) ; file_put_contents ( $ sPath , $ mData ) ; return $ this -> newItem ( $ sKey ) ; }
Writes to the cache

@param mixed       $mData The data to write
@param string|null $sKey  The key of the item

@return Item
@throws FactoryException
Writes to the cache