public function getCacheContent()
	{
		$content = '';

		if (!App::has('cache.store') || !$this->params->get('cache'))
		{
			return $content;
		}

		$debug = App::get('config')->get('debug');
		$key   = 'modules.' . $this->module->id;
		$ttl   = intval($this->params->get('cache_time', 0));

		if ($debug || !$ttl)
		{
			return $content;
		}

		if (!($content = App::get('cache.store')->get($key)))
		{
			ob_start();
			$this->run();
			$content = ob_get_contents();
			ob_end_clean();

			$content .= '<!-- cached ' . with(new Date('now'))->toSql() . ' -->';

			// Module time is in seconds, cache time is in minutes
			// Some module times may have been set in minutes so we
			// need to account for that.
			$ttl = $ttl <= 120 ? $ttl : ($ttl / 60);

			App::get('cache.store')->put($key, $content, $ttl);
		}

		return $content;
	}
public function getCacheContent()
	{
		$content = '';

		if (!App::has('cache.store') || !$this->params->get('cache'))
		{
			return $content;
		}

		$debug = App::get('config')->get('debug');
		$key   = 'modules.' . $this->module->id;
		$ttl   = intval($this->params->get('cache_time', 0));

		if ($debug || !$ttl)
		{
			return $content;
		}

		if (!($content = App::get('cache.store')->get($key)))
		{
			ob_start();
			$this->run();
			$content = ob_get_contents();
			ob_end_clean();

			$content .= '<!-- cached ' . with(new Date('now'))->toSql() . ' -->';

			// Module time is in seconds, cache time is in minutes
			// Some module times may have been set in minutes so we
			// need to account for that.
			$ttl = $ttl <= 120 ? $ttl : ($ttl / 60);

			App::get('cache.store')->put($key, $content, $ttl);
		}

		return $content;
	}
public function getCacheContent ( ) { $ content = '' ; if ( ! App :: has ( 'cache.store' ) || ! $ this -> params -> get ( 'cache' ) ) { return $ content ; } $ debug = App :: get ( 'config' ) -> get ( 'debug' ) ; $ key = 'modules.' . $ this -> module -> id ; $ ttl = intval ( $ this -> params -> get ( 'cache_time' , 0 ) ) ; if ( $ debug || ! $ ttl ) { return $ content ; } if ( ! ( $ content = App :: get ( 'cache.store' ) -> get ( $ key ) ) ) { ob_start ( ) ; $ this -> run ( ) ; $ content = ob_get_contents ( ) ; ob_end_clean ( ) ; $ content .= '<!-- cached ' . with ( new Date ( 'now' ) ) -> toSql ( ) . ' -->' ; // Module time is in seconds, cache time is in minutes // Some module times may have been set in minutes so we // need to account for that. $ ttl = $ ttl <= 120 ? $ ttl : ( $ ttl / 60 ) ; App :: get ( 'cache.store' ) -> put ( $ key , $ content , $ ttl ) ; } return $ content ; }
Get the cached contents of a module
caching it, if it doesn't already exist

@return  string
Get the cached contents of a module caching it if it doesn t already exist