public function cacheResult(array $args, callable $phpCode, $widgetObj, $form = 'HTML')
    {
        $key = $this->makeCacheKey($args, $widgetObj, $form);

        $cache = app('cache');

        if (! empty($widgetObj->cacheTags) && $this->cacheDriverSupportsTags()) {
            $cache = $cache->tags($widgetObj->cacheTags);
        }

        if ($widgetObj->cacheLifeTime === 0) {
            return $phpCode();
        }

        return $cache->remember($key, $widgetObj->cacheLifeTime, $phpCode);
    }
public function cacheResult(array $args, callable $phpCode, $widgetObj, $form = 'HTML')
    {
        $key = $this->makeCacheKey($args, $widgetObj, $form);

        $cache = app('cache');

        if (! empty($widgetObj->cacheTags) && $this->cacheDriverSupportsTags()) {
            $cache = $cache->tags($widgetObj->cacheTags);
        }

        if ($widgetObj->cacheLifeTime === 0) {
            return $phpCode();
        }

        return $cache->remember($key, $widgetObj->cacheLifeTime, $phpCode);
    }
public function cacheResult ( array $ args , callable $ phpCode , $ widgetObj , $ form = 'HTML' ) { $ key = $ this -> makeCacheKey ( $ args , $ widgetObj , $ form ) ; $ cache = app ( 'cache' ) ; if ( ! empty ( $ widgetObj -> cacheTags ) && $ this -> cacheDriverSupportsTags ( ) ) { $ cache = $ cache -> tags ( $ widgetObj -> cacheTags ) ; } if ( $ widgetObj -> cacheLifeTime === 0 ) { return $ phpCode ( ) ; } return $ cache -> remember ( $ key , $ widgetObj -> cacheLifeTime , $ phpCode ) ; }
Caches the widget output.

@param array $args
@param callable $phpCode
@param object $widgetObj

@param string $form
@return null
Caches the widget output .