protected function fetchDefaultCacheRecord($method, $args)
    {
        // Instead of using has() we directly implement the value getter
        // to avoid additional cache hits if the key exists.
        if (is_null($value = parent::get($args['key']))) {
            $this->checkReservedKeyPattern($args['key']);

            call_user_func_array([$this, 'storeKeywords'], array_only($args, ['key', 'minutes', 'keywords']));

            $this->setKeywordsOperation(true);

            $value = call_user_func_array(['parent', $method], array_values($args));

            $this->setKeywordsOperation(false);
        }

        if (! $this->operatingOnKeywords()) {
            $this->resetCurrentKeywords();
        }

        return $value;
    }
protected function fetchDefaultCacheRecord($method, $args)
    {
        // Instead of using has() we directly implement the value getter
        // to avoid additional cache hits if the key exists.
        if (is_null($value = parent::get($args['key']))) {
            $this->checkReservedKeyPattern($args['key']);

            call_user_func_array([$this, 'storeKeywords'], array_only($args, ['key', 'minutes', 'keywords']));

            $this->setKeywordsOperation(true);

            $value = call_user_func_array(['parent', $method], array_values($args));

            $this->setKeywordsOperation(false);
        }

        if (! $this->operatingOnKeywords()) {
            $this->resetCurrentKeywords();
        }

        return $value;
    }
protected function fetchDefaultCacheRecord ( $ method , $ args ) { // Instead of using has() we directly implement the value getter // to avoid additional cache hits if the key exists. if ( is_null ( $ value = parent :: get ( $ args [ 'key' ] ) ) ) { $ this -> checkReservedKeyPattern ( $ args [ 'key' ] ) ; call_user_func_array ( [ $ this , 'storeKeywords' ] , array_only ( $ args , [ 'key' , 'minutes' , 'keywords' ] ) ) ; $ this -> setKeywordsOperation ( true ) ; $ value = call_user_func_array ( [ 'parent' , $ method ] , array_values ( $ args ) ) ; $ this -> setKeywordsOperation ( false ) ; } if ( ! $ this -> operatingOnKeywords ( ) ) { $ this -> resetCurrentKeywords ( ) ; } return $ value ; }
Fetch or store a default item in the cache using the specified method and arguments.

@param  string $method
@param  array  $args
@return mixed
@throws \Propaganistas\LaravelCacheKeywords\Exceptions\ReservedCacheKeyPatternException
Fetch or store a default item in the cache using the specified method and arguments .