Render the document.

@param   boolean  $cache   If true, cache the output
@param   array    $params  Associative array of attributes
@return  The rendered data
969987
public function render($cache = false, $params = array())
	{
		$this->setMimeEncoding($this->_mime);

		parent::render();

		\App::get('response')->headers->set('Content-disposition', 'inline; filename="' . $this->getName() . '.xml"', true);

		return $this->getBuffer();
	}
1101329
public function asset_render($params) {
        $group = isset($params['group']) ? $params['group'] : null;
        $raw = isset($params['raw']) ? $params['raw'] : false;
        return Asset::render($group, $raw);
    }
506567
function ( params, cache ) {
            var sp = ( this._path.indexOf('?') < 0 )? '?' : '&',
                url = ( cache )? this._path : this._path + sp + 'requestTime=' + new Date().getTime();
    
            //URI encode
            if ( params ) {
                var datas = params.split( '&' ),
                    paramNum = datas.length,
                    dataSet, i;
    
                params = '';
                for ( i = 0; i < paramNum; ++i ) {
                    dataSet = datas[i].split( '=' );
                    params += dataSet[0] + '=' + encodeURIComponent( dataSet[1] );
                    if ( i < paramNum - 1 ) params += '&';
                }
            }
    
            this.xhr.onreadystatechange = this._handler;
    
            //GET
            if ( /get/i.test(this._method) ) {
                if ( params && params != '' ) url += '&' + params;
                this.xhr.open( 'GET', url, true );
                this.xhr.send( null );
                //POST
            } else {
                this.xhr.open( 'POST', url, true );
                this.xhr.setRequestHeader( 'Content-type', 'application/x-www-form-urlencoded; charset=' + this._charset );
                this.xhr.send( params );
            }
            return this;
        }
277235
public function render($template, array $params = [])
    {
        return $this->write($this->app->getView()->render($template, $params));
    }
36019
protected function _renderView()
	{
		$isCacheEnabled = Agl::app()->isCacheEnabled();

		if ($isCacheEnabled) {
			$cacheInfo = $this->_getCacheInfo();

			if (! empty($cacheInfo)
				and $cacheInstance = Agl::getCache()
				and $cacheInstance->has($cacheInfo[CacheInterface::CACHE_KEY])) {
				return $cacheInstance->get($cacheInfo[CacheInterface::CACHE_KEY]);
			}
		}

        $viewModel = $this->_getView();

		$content = $viewModel
			->startBuffer()
			->render();

		if ($isCacheEnabled and ! empty($cacheInfo)) {
        	$cacheInstance->set($cacheInfo[CacheInterface::CACHE_KEY], $content, $cacheInfo[ConfigInterface::CONFIG_CACHE_TTL_NAME]);
		}

		return $content;
	}
644171
public function render(array $params = []) {
        return trim(String::insert($this->getStatement(), $params + $this->getParams(), ['escape' => false])) . ';';
    }
1008391
function render($file,$mime='text/html',array $hive=NULL,$ttl=0) {
        $fw=Base::instance();
        $cache=Cache::instance();
        if (!is_dir($tmp=$fw->get('TEMP')))
            mkdir($tmp,Base::MODE,TRUE);
        foreach ($fw->split($fw->get('UI')) as $dir) {
            $cached=$cache->exists($hash=$fw->hash($dir.$file),$data);
            if ($cached && $cached[0]+$ttl>microtime(TRUE))
                return $data;
            if (is_file($view=$fw->fixslashes($dir.$file))) {
                if (!is_file($this->view=($tmp.
                    $fw->hash($fw->get('ROOT').$fw->get('BASE')).'.'.
                    $fw->hash($view).'.php')) ||
                    filemtime($this->view)<filemtime($view)) {
                    // Remove PHP code and comments
                    $text=preg_replace(
                        '/(?<!["\'])\h*<\?(?:php|\s*=).+?\?>\h*'.
                        '(?!["\'])|\{\*.+?\*\}/is','',
                        $fw->read($view));
                    $text = $this->parse($text);
                    $fw->write($this->view,$this->build($text));
                }
                if (isset($_COOKIE[session_name()]))
                    @session_start();
                $fw->sync('SESSION');
                if ($mime && PHP_SAPI!='cli' && !headers_sent())
                    header('Content-Type: '.($this->mime=$mime).'; '.
                        'charset='.$fw->get('ENCODING'));
                $data=$this->sandbox($hive);
                if(isset($this->trigger['afterrender']))
                    foreach ($this->trigger['afterrender'] as $func)
                        $data = $fw->call($func, $data);
                if ($ttl)
                    $cache->set($hash,$data);
                return $data;
            }
        }
        user_error(sprintf(Base::E_Open,$file),E_USER_ERROR);
    }
509899
public function render($cache = false, $params = array())
	{
		// Get the feed type
		$type = \Request::getCmd('type', 'Rss');

		// Instantiate feed renderer and set the mime encoding
		$renderer = $this->loadRenderer(($type) ? $type : 'rss');

		if (!($renderer instanceof Renderer))
		{
			\App::abort(404, \Lang::txt('Resource Not Found'));
		}

		$this->setMimeEncoding($renderer->getContentType());

		// output
		// Generate prolog
		$data  = '<?xml version="1.0" encoding="' . $this->_charset . '"?>' . "\n";
		$data .= '<!-- generator="' . $this->getGenerator() . '" -->' . "\n";

		// Generate stylesheet links
		foreach ($this->_styleSheets as $src => $attr)
		{
			$data .= '<?xml-stylesheet href="' . $src . '" type="' . $attr['mime'] . '"?>' . "\n";
		}

		// Render the feed
		$data .= $renderer->render();

		parent::render();

		return $data;
	}
340409
public function renderResponse($view, $params = [])
    {
        /** @var \DevGroup\AdminUtils\controllers\BaseController $context */
        $context = $this instanceof Action ? $this->controller : $this;
        if (Yii::$app->request->isAjax === true) {
            Yii::$app->response->format = Response::FORMAT_JSON;

            $content = $context->renderAjax($view, $params);
            return new AjaxResponse($content, false, Yii::$app->session->getAllFlashes(true));
        } else {
            return $context->render($view, $params);
        }
    }
351270
public function renderString($template, array $params = null)
    {
        if (! empty($params)) {
            $this->assign($params);
        }

        $compiled = $this->getCompiler()->compile($template);

        $tempFile = tempnam(sys_get_temp_dir(), __FUNCTION__);

        $this->writeToFile($tempFile, $compiled);

        $template = $this->readBuffer($tempFile);

        unlink($tempFile);

        return $template;
    }
735528
def render_content(content, **kwargs):
    ''''''
    # try to take pre rendered content from django cache, if caching is enabled
    if settings.ACTIVE_URL_CACHE:
        cache_key = get_cache_key(content, **kwargs)

        # get cached content from django cache backend
        from_cache = cache.get(cache_key)

        # return pre rendered content if it exist in cache
        if from_cache is not None:
            return from_cache

    # render content with "active" logic
    content = check_content(content, **kwargs)

    # write rendered content to django cache backend, if caching is enabled
    if settings.ACTIVE_URL_CACHE:
        cache.set(cache_key, content, settings.ACTIVE_URL_CACHE_TIMEOUT)

    return content
26063
public function request($function, array $params = array(), $cache = null)
    {
        $request = $this->startRequest($function, $params, $cache);

        return $this->fetchResponse($request);
    }
243063
protected function render(string $view, array $params = []): Response
    {
        $this->getTemplateEngine()->addGlobal('_request', $this->getRequest());
        $template = $this->getTemplateEngine()->render($view, $params);

        return $this->getResponse()->setContent($template);
    }
1152420
public function writeTo(string $key, $data, array $params = []): bool
    {
        $result = false;

        if ($this->skipCache()) {
            $this->warnings[] = 'Skipping writing to cache';

            return $result;
        }

        $cachedData['data'] = $data;
        $raw = empty($params['raw']) ? false : (bool)$params['raw'];
        if ($raw) {
            if (!array_key_exists('data', $data)) {
                $this->errors[] = "Raw data is missing 'data' key";

                return $result;
            }
            $cachedData = $data;
        }

        $result = CakeCache::write($key, $cachedData, $this->getConfig());
        if (!$result) {
            $this->errors[] = 'Failed to write value to cache';
        }

        return $result;
    }
29203
public function file($file, $params = array(), $sandbox=false) {

        if ($this->cachePath) {

            $cachedfile = $this->get_cached_file($file, $sandbox);

            if ($cachedfile) {

                ob_start();

                lexy_include_with_params($cachedfile, $params, $file);

                $output = ob_get_clean();

                return $output;
            }
        }


        return $this->execute(file_get_contents($file), $params, $sandbox, $file);
    }
346257
public function render(array $array, string $key) {
    $result = null;

    if (is_array($array) && $key) {
      if (array_key_exists($key, $array)) {
        $result = $array[$key];
      }
    }

    return $result;
  }
1325205
public function get($cacheGroupKey, array $params = [], $tags = null)
    {
        // Make sure caching is enabled
        if (!$this->isCachingEnabled()) {
            return;
        }

        // Retrieve cache group settings
        $cacheGroup = $this->getCacheGroup($cacheGroupKey);

        // Set cache tag to group name
        if (!$tags) {
            $tags = $cacheGroupKey;
        }

        if (empty($cacheGroup) || (empty($cacheGroup['active']) || empty($cacheGroup['key']))) {
            return;
        }

        // Generate cache key
        $cacheKey = $this->generateCacheKey($cacheGroup['key'], $params);

        return IlluminateCache::tags($tags)->get($cacheKey);
    }