protected function executeCallback($class, $method, $args, Closure $closure)
    {
        $skipUri = $this->getContainer('config')->get('rinvex.repository.cache.skip_uri');

        // Check if cache is enabled
        if ($this->getCacheLifetime() && ! $this->getContainer('request')->has($skipUri)) {
            return $this->cacheCallback($class, $method, $args, $closure);
        }

        // Cache disabled, just execute qurey & return result
        $result = call_user_func($closure);

        // We're done, let's clean up!
        $this->resetRepository();

        return $result;
    }
protected function executeCallback($class, $method, $args, Closure $closure)
    {
        $skipUri = $this->getContainer('config')->get('rinvex.repository.cache.skip_uri');

        // Check if cache is enabled
        if ($this->getCacheLifetime() && ! $this->getContainer('request')->has($skipUri)) {
            return $this->cacheCallback($class, $method, $args, $closure);
        }

        // Cache disabled, just execute qurey & return result
        $result = call_user_func($closure);

        // We're done, let's clean up!
        $this->resetRepository();

        return $result;
    }
protected function executeCallback ( $ class , $ method , $ args , Closure $ closure ) { $ skipUri = $ this -> getContainer ( 'config' ) -> get ( 'rinvex.repository.cache.skip_uri' ) ; // Check if cache is enabled if ( $ this -> getCacheLifetime ( ) && ! $ this -> getContainer ( 'request' ) -> has ( $ skipUri ) ) { return $ this -> cacheCallback ( $ class , $ method , $ args , $ closure ) ; } // Cache disabled, just execute qurey & return result $ result = call_user_func ( $ closure ) ; // We're done, let's clean up! $ this -> resetRepository ( ) ; return $ result ; }
Execute given callback and return the result.

@param string   $class
@param string   $method
@param array    $args
@param \Closure $closure

@return mixed
Execute given callback and return the result .