@author Vova Feldman (@svovaf)
@since  1.0.3

@param bool $flush
359510
function load( $flush = false ) {
            $this->_logger->entrance();

            $option_name = $this->get_option_manager_name();

            if ( $flush || ! isset( $this->_options ) ) {
                if ( isset( $this->_options ) ) {
                    // Clear prev options.
                    $this->clear();
                }

                $cache_group = $this->get_cache_group();

                if ( ! WP_FS__DEBUG_SDK ) {

                    $this->_options = wp_cache_get(
                        $option_name,
                        $cache_group
                    );
                }

                $cached = true;

                if ( empty( $this->_options ) ) {
                    if ( $this->_is_network_storage ) {
                        $this->_options = get_site_option( $option_name );
                    } else if ( $this->_blog_id > 0 ) {
                        $this->_options = get_blog_option( $this->_blog_id, $option_name );
                    } else {
                        $this->_options = get_option( $option_name );
                    }

                    if ( is_string( $this->_options ) ) {
                        $this->_options = json_decode( $this->_options );
                    }

//					$this->_logger->info('get_option = ' . var_export($this->_options, true));

                    if ( false === $this->_options ) {
                        $this->clear();
                    }

                    $cached = false;
                }

                if ( ! WP_FS__DEBUG_SDK && ! $cached ) {
                    // Set non encoded cache.
                    wp_cache_set( $option_name, $this->_options, $cache_group );
                }
            }
        }
470382
function store( $module = false, $flush = true ) {
			if ( false !== $module ) {
				$this->_module = $module;
			}

			$all_modules = $this->get_all_modules( $this->_module->type );
			$all_modules[ $this->_module->slug ] = $this->_module;

			$options_manager = $this->get_option_manager();
			$options_manager->set_option( $this->_module->type . 's', $all_modules, $flush );

			return $this->_module;
		}
353417
public function flush(bool $nl = false, $quit = false, array $opts = []): void
    {
        Console::flushBuffer($nl, $quit, $opts);
    }
1081805
protected function flush()
    {
        echo "\nFlushing directories... ";
        foreach ($this->flushPaths as $dir) {
            $path = $this->basePath . '/' . $dir;
            if (file_exists($path)) {
                $this->flushDirectory($path);
            }
            $this->ensureDirectory($path);
        }
        echo "done\n";
    }
377016
protected function setOption(int $option, bool $bool) : void
    {
        if ($bool) {
            $this->options |= $option;
        } else {
            $this->options &= ~ $option;
        }
    }
1267104
function flush () {
            var i = 0;
            while (i < fnQueueLen) {
                fn(fnQueue[i], fnQueue[i + 1]);
                fnQueue[i++] = $undefined;
                fnQueue[i++] = $undefined;
            }

            fnQueueLen = 0;
            if (fnQueue.length > initQueueSize) fnQueue.length = initQueueSize;
        }
586657
public function delete($media, $flush = true)
    {
        parent::delete($media, $flush);

        foreach ($this->filesystemManipulator->keys() as $key) {
            if (preg_match('#/'.$media->getReference().'$#', $key)) {
                $this->filesystemManipulator->delete($key);
            }
        }
    }
1239024
function js($flush = true) {
        $js = $this->_js;
        if ($flush) $this->_js = [];
        $html = '';
        foreach ($js as $url => $inc) {
            $html .= '<script src="'.$url.'"></script>'.PHP_EOL;
        }
        if (!empty($this->_scripts)) {
            $scripts = $this->_scripts;
            if ($flush) $this->_scripts = [];
            $html .= '<script>'.PHP_EOL;
            foreach ($scripts as $script) {
                $html .= $script . PHP_EOL;
            }
            $html .= '</script>';
        }
        return $html;
    }
637302
public function update($object, $flush = true)
    {
        try {
            $entityManager = $this->getEntityManager($object);
            $this->preUpdate($object);
            $entityManager->persist($object);
            if ($flush) {
                $entityManager->flush();
            }
            $this->postUpdate($object);
        } catch (\PDOException $e) {
            throw new ModelManagerException('', 0, $e);
        }
    }
1049917
function load( $flush = false, $network_level = true ) {
            if ( $this->_is_multisite && $network_level ) {
                $this->_network_options->load( $flush );
            } else {
                $this->_options->load( $flush );
            }
        }
648580
private function flush()
    {
        $currentConfigurationHash = $this->getCurrentConfigurationState();

        if ($currentConfigurationHash !== get_option('strata_rewrite_state')) {
            update_option('strata_rewrite_state', $currentConfigurationHash);
            flush_rewrite_rules();
            return true;
        }

        return false;
    }
658950
public function update(User $user, $flush = true)
    {
        $this->objectManager->persist($user);

        if ($flush) {
            $this->objectManager->flush();
        }
    }
399951
public static function flush() {
    if (isset(self::$app_log_group)) {
      $req = new FlushRequest();
      $req->setLogs(self::$app_log_group->serializeToString());
      $resp = new VoidProto();
      ApiProxy::makeSyncCall('logservice', 'Flush', $req, $resp);
      self::$app_log_group->clear();
      self::$last_flush_time = microtime(true);
    }
  }
44412
public function _flush($data)
    {
        $id = array_pop($this->_idStack);
        if ($id === null) {
            Zend_Cache::throwException('use of _flush() without a start()');
        }
        if ($this->_extension) {
            $this->save(serialize(array($data, $this->_extension)), $id, $this->_tags);
        } else {
            $this->save($data, $id, $this->_tags);
        }
        return $data;
    }
1104267
public function flush() {
        $headerHost = $this->host_.($this->port_ != 80 ? ':'.$this->port_ : '');

        $headers = array();
        $defaultHeaders = array('Host' => $headerHost,
                                'Accept' => 'application/x-thrift',
                                'User-Agent' => 'PHP/THttpClient',
                                'Content-Type' => 'application/x-thrift',
                                'Content-Length' => TStringFuncFactory::create()->strlen($this->buf_),
                            );
        foreach (array_merge($defaultHeaders, $this->headers_) as $key => $value) {
            $headers[] = "$key: $value";
        }

        $body = "POST " . $this->uri_ . " HTTP/1.1\r\n";
        foreach ($headers as $val) {
            $body .= "$val\r\n";
        }
        $body .= "\r\n";
        $body .= $this->buf_;

        // Set the hard-coded response.
        $this->respBuffer_ = $this->emptyResponse_;

        if ($this->_ensureSocketCreated()) {
            $this->_writeStream($body);
        } else if ($this->debug_) {
            error_log("Failed to create socket");
        }

        $this->buf_ = '';
    }
832584
public function flush(): bool
    {
        $this->checkConnection(__METHOD__);
        $flush = $this->engine->flush();
        if ($flush && $this->index) {
            $this->index->events()->trigger(Indexing::EVENT_ON_FLUSH)
                ->fire();
        }

        return $flush;
    }
1272921
public function flush()
    {
        if ($this->fileSystem->isDirectory($this->directory))
        {
            $this->fileSystem->deleteDirectory($this->directory, true);
        }
    }