source/Core/Utils.php
public function commitFileCache()
    {
        if (!empty($this->_aLockedFileHandles[LOCK_EX])) {
            startProfile("!__SAVING CACHE__! (warning)");
            foreach ($this->_aLockedFileHandles[LOCK_EX] as $sKey => $rHandle) {
                if ($rHandle !== false && isset($this->_aFileCacheContents[$sKey])) {
                    // #0002931A truncate file once more before writing
                    ftruncate($rHandle, 0);

                    // writing cache
                    fwrite($rHandle, $this->_processCache($sKey, $this->_aFileCacheContents[$sKey]));

                    // releasing locks
                    $this->_releaseFile($sKey);
                }
            }

            stopProfile("!__SAVING CACHE__! (warning)");

            //empty buffer
            $this->_aFileCacheContents = [];
        }
    }
public function commitFileCache()
    {
        if (!empty($this->_aLockedFileHandles[LOCK_EX])) {
            startProfile("!__SAVING CACHE__! (warning)");
            foreach ($this->_aLockedFileHandles[LOCK_EX] as $sKey => $rHandle) {
                if ($rHandle !== false && isset($this->_aFileCacheContents[$sKey])) {
                    // #0002931A truncate file once more before writing
                    ftruncate($rHandle, 0);

                    // writing cache
                    fwrite($rHandle, $this->_processCache($sKey, $this->_aFileCacheContents[$sKey]));

                    // releasing locks
                    $this->_releaseFile($sKey);
                }
            }

            stopProfile("!__SAVING CACHE__! (warning)");

            //empty buffer
            $this->_aFileCacheContents = [];
        }
    }
public function commitFileCache ( ) { if ( ! empty ( $ this -> _aLockedFileHandles [ LOCK_EX ] ) ) { startProfile ( "!__SAVING CACHE__! (warning)" ) ; foreach ( $ this -> _aLockedFileHandles [ LOCK_EX ] as $ sKey => $ rHandle ) { if ( $ rHandle !== false && isset ( $ this -> _aFileCacheContents [ $ sKey ] ) ) { // #0002931A truncate file once more before writing ftruncate ( $ rHandle , 0 ) ; // writing cache fwrite ( $ rHandle , $ this -> _processCache ( $ sKey , $ this -> _aFileCacheContents [ $ sKey ] ) ) ; // releasing locks $ this -> _releaseFile ( $ sKey ) ; } } stopProfile ( "!__SAVING CACHE__! (warning)" ) ; //empty buffer $ this -> _aFileCacheContents = [ ] ; } }
Writes all cache contents to file at once. This method was introduced due to possible
race conditions. Cache is cleaned up after commit
Writes all cache contents to file at once . This method was introduced due to possible race conditions . Cache is cleaned up after commit