Cache a view. If minutes are null, the view is cached forever.

@param array        $data
@param string       $view
@param array        $mergeData
@param int          $minutes
@param string       $key
@param string|array $tag

@return string
178473
public function cache($data, $view, $mergeData = null, $minutes = null, $key = null, $tag = null)
    {
        if (! $this->enabled) {
            return call_user_func($this->renderView($view, $data, $mergeData));
        }

        $viewKey = $this->getCacheKeyForView($view, $key);

        $mergeData = $mergeData ?: [];

        $tags = $this->getTags($tag);

        $minutes = $this->resolveCacheDuration($minutes);

        if ($this->cacheIsTaggable && $minutes === null) {
            return $this->cache
                ->tags($tags)
                ->rememberForever($viewKey, $this->renderView($view, $data, $mergeData));
        }

        if ($this->cacheIsTaggable) {
            return $this->cache
                ->tags($tags)
                ->remember($viewKey, $minutes, $this->renderView($view, $data, $mergeData));
        }

        if ($minutes === null) {
            return $this->cache
                ->rememberForever($viewKey, $this->renderView($view, $data, $mergeData));
        }

        return $this->cache
            ->remember($viewKey, $minutes, $this->renderView($view, $data, $mergeData));
    }
433847
public function make($view, $data = array(), $mergeData = array())
    {
        if (isset($this->aliases[$view])) $view = $this->aliases[$view];

        $path = $this->finder->find($view);

        if (is_null($path) || ! is_readable($path)) {
            throw new BadMethodCallException("File path [$path] does not exist");
        }

        $data = array_except(
            array_merge($mergeData, $this->parseData($data)), array('__data', '__path')
        );

        $this->callCreator(
            $view = new View($this, $this->getEngineFromPath($path), $view, $path, $data)
        );

        return $view;
    }
1370417
public static function render($view = '', $data = array())
    {
        $smarty = new Smarty();
        $smarty->setTemplateDir(self::$path);
        $smarty->setCompileDir(self::$compilePath);
        $smarty->setCacheDir(self::$cachePath);
        $smarty->left_delimiter = '{';
        $smarty->right_delimiter = '}';
        $smarty->debugging = false;
        if (self::$isDebug == true) {
            $smarty->caching = false;
            $smarty->clearAllCache();
            $smarty->clearCompiledTemplate($view);
        } else {
            $smarty->caching = true;
        }
        if (is_array($data)) {
            foreach ($data as $key => $value) {
                $smarty->assign($key, $value);
            }
        }
        $view .= '.tpl';
        $smarty->display($view);
        return null;
    }
257084
public function put(string $key, $value, array $tags, int $seconds = null)
    {
        if (is_null($seconds)) {
            $seconds = $this->seconds;
        }

        return $this->cache->tags($tags)->put($key, $value, $seconds);
    }
266127
public function partial($partialView, $data = [], $mergeData = [])
    {
        $factory = $this->getFactory();

        return $factory->render($partialView, $data, $mergeData);
    }
764597
public static function view(string $view, array $data = [])
  {
    $global = Self::$variables::get();
    $data = array_merge($global, $data);

    return Self::$view->view($view, $data);
  }
428285
public function view($view, $data = array(), $mergeData = array())
    {
        return $this->views->make($this->getThemeNamespace($view), $data, $mergeData);
    }
271504
public function render($view, array $data = array())
    {
        $original_view = $this->view;

        if (!empty($data)) {
            $this->shared_data->merge($data);
        }

        $this->view = $view;

        if (null === $this->layout) {
            $this->yieldView();
        } else {
            require $this->layout;
        }

        if (false !== $this->response->chunked) {
            $this->response->chunk();
        }

        // restore state for parent render()
        $this->view = $original_view;
    }
671566
public function _mergeAfterFetch($result, $completeData = true)
    {
        // This loop will clear operations for keys provided by the server
        // It will not clear operations for new keys the server doesn't have.
        foreach ($result as $key => $value)
        {
            if (isset($this->operationSet[$key]))
            {
                unset($this->operationSet[$key]);
            }
        }
        $this->serverData = array();
        $this->dataAvailability = array();
        $this->mergeFromServer($result, $completeData);
        $this->rebuildEstimatedData();
    }
703419
public function view($view, array $data = array())
    {
        $this->view = $view;

        $this->viewData = $data;

        return $this;
    }
492402
public function loadViews($viewNames = array(), $data = array(), $mergeData = array())
    {
        $this->children = array();
        foreach ($viewNames as $key => $viewName) {
            $className = get_class();
            $item = new $className($this->cmd, $this->folder);
            $item->loadView($viewName, $data, $mergeData);
            $this->children[] = $item;
        }

        return $this;
    }
593471
public function file( $path, $data = [], $mergeData = [] )
	{
		$data = array_merge( $mergeData, $this->parseData( $data ) );

		$this->callCreator( $view = new View( $this, $this->getEngineFromPath( $path ), $path, $path, $data ) );

		return $view;
	}
466515
private function saveDeferred($key, $data, $expiresAfter = null, $tags = [])
    {
        $item = $this->cache->getItem($key);
        $item->set($data);
        $item->expiresAfter($expiresAfter);

        if (0 !== \count($tags)) {
            $item->tag($tags);
        }

        return $this->cache->saveDeferred($item);
    }
769439
public function make($view, $data = array(), $mergeData = array())
	{
		$path = $this->finder->find($view);

		$data = array_merge($mergeData, $this->parseData($data));

		$this->callCreator($view = new View($this, $this->getEngineFromPath($path), $view, $path, $data));

		return $view;
	}
256708
public function render($view = null, $data = array())
    {
        if (is_null($view)) {
            $view = static::$defaultSimpleView;
        }

        $data = array_merge($data, array(
            'paginator' => $this,
        ));

        return new HtmlString(
            static::viewFactory()->make($view, $data)->render()
        );
    }
1137141
public static function get($view, $data = array()){

        if( $data ){
            self::$level = self::$level + 1;
            self::$data[ self::$level ] = (array) $data;
        }

        $file = SRC. "{$view}.php";

        // Parse view
        ob_start();

            self::process($file);

            if( $data ){

                unset(self::$data[ self::$level ]);
                self::$level = self::$level - 1;
                self::process(NULL);

            }

            $view = ob_get_contents();

        ob_end_clean();

        return $view;
    }
1058616
protected function cacheSet($id, $data, $lifetime = null, $tags = null) {
		return $this->getCacheFrontend()->set($id, $data, $lifetime, $tags);
	}