Partial flush action, flushes Magento URLs matching "pattern" in POST
data

@return null
7995
public function flushPartialAction() {
        $postData = $this->getRequest()->getPost();
        if ( ! isset($postData['pattern'])) {
            $this->_getSession()->addError($this->__('Missing URL post data'));
        } else {
            $pattern = $postData['pattern'];
            Mage::dispatchEvent('turpentine_varnish_flush_partial',
                array('pattern' => $pattern));
            $result = Mage::getModel('turpentine/varnish_admin')
                ->flushUrl($pattern);
            foreach ($result as $name => $value) {
                if ($value === true) {
                    $this->_getSession()
                        ->addSuccess(Mage::helper('turpentine/data')
                            ->__('Flushed matching URLs for: ').$name);
                } else {
                    $this->_getSession()
                        ->addError(Mage::helper('turpentine/data')
                            ->__('Error flushing matching URLs on: ').$name);
                }
            }
        }
        $this->_redirect('*/cache');
    }
444346
public function flush()
    {
        $this->_result = null;
        $this->_lastResult = array();
        $this->_lastQuery = null;
        $this->_lastQueryHash = null;
    }
427885
public function flush_all()
    {
        /**
         * flush_all\r\n
         */

        // Build packet to send ...
        $data = self::COMMAND_FLUSH_ALL . self::COMMAND_TERMINATOR;

        return $this->send(self::COMMAND_FLUSH_ALL, $data);
    }
87081
public function flush(){
        $url = $this->apiUrl.'/cgi-bin/menu/delete?access_token='.$this->getAccessToken();
        $result = $this->curl($url);
        return $this->get($result);
    }
385905
public function flushMessage(){
        if( session_id() ){
            foreach( [ $this->error_key => 'error', $this->message_key => 'updated' ] as $key => $class_name ){
                if( isset($_SESSION[$key]) && !empty($_SESSION[$key]) ){
                    $markup = sprintf('<div class="%s"><p>%s</p></div>', $class_name, implode('<br />', $_SESSION[$key]));
                    if( is_admin() ){
                        echo $markup;
                    }else{
                        /**
                         * Post redirect get message's filter
                         *
                         * @param string $markup html string
                         * @param array $messages Messages' array
                         * @param string $class_name updated or error.
                         * @return string
                         */
                        echo apply_filters('wpametu_prg_message_class', $markup, $_SESSION[$key], $class_name);
                    }
                    // Make session empty.
                    $_SESSION[$key] = [];
                }
            }
        }
    }
873052
protected function flushValues()
	{
		// first, remove expired content from cache
		eaccelerator_gc();
		// now, remove leftover cache-keys
		$keys = eaccelerator_list_keys();
		foreach($keys as $key)
			$this->deleteValue(substr($key['name'], 1));
		return true;
	}
1199150
private function cleanPost()
    {
        $this->post = $_POST;
        // Sanitize global data
        if (is_array($_POST)) {
            foreach ($_POST as $key => $value) {
                $_POST[$this->cleanKeys($key)] = $this->sanitize($value);
            }
        } else {
            $_POST = [];
        }

        return $_POST;
    }
783220
function flush()
    {
        /* Attempt to flush each of our children. */
        $flushed = true;
        foreach ($this->_children as $child) {
            $flushed &= $child->flush();
        }

        /* If all children were flushed, return success. */
        return $flushed;
    }
192012
public function flush()
    {
        if ($this->pollMode === null) { // first polling request is not there yet
            return;
        }
        if ($this->flushing) {
            return;
        }
        $bsize = sizeof($this->buffer);
        $fbsize = sizeof($this->framesBuffer);
        if ($bsize === 0 && $fbsize === 0) {
            return;
        }
        $this->flushing = true;
        if (in_array('one-by-one', $this->pollMode)) {
            $b = array_slice($this->buffer, 0, 1);
            $bsize = sizeof($b);
        } else {
            $b = $this->buffer;
        }
        if ($fbsize > 0) {
            if (!in_array('one-by-one', $this->pollMode) || !sizeof($b)) {
                $b[] = 'a' . $this->toJson($this->framesBuffer);
            } else {
                $fbsize = 0;
            }
        }
        $this->appInstance->publish(
            's2c:' . $this->id,
            $this->toJson($b),
            function ($redis) use ($bsize, $fbsize, $b) {
                $this->flushing = false;
                if (!$redis) {
                    return;
                }
                //D(['b' => $b, $redis->result]);
                if ($redis->result === 0) {
                    return;
                }
                $reflush = false;
                if (sizeof($this->buffer) > $bsize) {
                    $this->buffer = array_slice($this->buffer, $bsize);
                    $reflush = true;
                } else {
                    $this->buffer = [];
                }

                if (sizeof($this->framesBuffer) > $fbsize) {
                    $this->framesBuffer = array_slice($this->framesBuffer, $fbsize);
                    $reflush = true;
                } else {
                    $this->framesBuffer = [];
                }
                $this->onWrite();
                if ($reflush && in_array('stream', $this->pollMode)) {
                    $this->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);
    }
  }
843542
public function flushCache($pattern = null)
    {
        $keys = $this->getServiceKeys($pattern);

        array_map(function ($key) {
            $actualKey = $this->getFullKey($key);
            $this->log('flushing cache for '.get_class($this).' ('.$actualKey.')');

            CacheFacade::forget($actualKey);
        }, $keys);
    }
1004017
public function flush()
    {
        /** @var Cache $cache */
        $cache = $this->app['phraseanet.cache-service'];
        $flushOK = $cache->flushAll() ? 'ok' : 'ko';

        return $this->app->redirectPath('admin_dashboard', ['flush_cache' => $flushOK]);
    }
287510
protected function flushDeletes()
    {
        if ( ! $this->deleteTarget) {
            return;
        }

        foreach ($this->queuedForDelete as $variant) {
            $this->handler->deleteVariant($this->deleteTarget, $variant);
        }

        $this->queuedForDelete = [];
    }
1121657
public function flush()
    {
        $this->buffer = array_merge($this->cache, $this->buffer);

        return file_put_contents($this->options->get('store'), json_encode($this->buffer));
    }
262901
public function cleanUrlHandler(): void
    {
        global $pretext;

        $basename = explode('?', (string) $pretext['request_uri']);
        $basename = basename(array_shift($basename));

        if ($basename === 'robots.txt') {
            $this->sendRobots();
        }

        if ($basename === 'sitemap.xml' || $basename === 'sitemap.xml.gz') {
            $this->populateArticleFields()->sendSitemap();
        }
    }
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;
    }
65940
protected function flush()
    {
        // The root node always exists
        if (!isset($this->json['/'])) {
            $this->json['/'] = null;
        }

        // Always save in reverse order
        krsort($this->json);

        // Comply to schema
        $json = (object) $this->json;

        if (isset($json->{'_order'})) {
            $order = $json->{'_order'};

            foreach ($order as $path => $entries) {
                foreach ($entries as $key => $entry) {
                    $order[$path][$key] = (object) $entry;
                }
            }

            $json->{'_order'} = (object) $order;
        }

        $this->encoder->encodeFile($json, $this->path, $this->schemaPath);
    }