public function cacheKey($caller, array $parameters = [])
    {
        $parameters = compact('caller', 'parameters');

        if ($this->repository->model instanceof Eloquent || $this->repository->model instanceof Builder) {
            $parameters['eager'] = md5(serialize($this->repository->with));
        }

        if ($this->repository->mediator->criteria()->hasCriteria()) {
            $parameters['criteria'] = md5(serialize($this->repository->mediator->criteria()->getCriterias()));
        }

        return md5(serialize($parameters));
    }
public function cacheKey($caller, array $parameters = [])
    {
        $parameters = compact('caller', 'parameters');

        if ($this->repository->model instanceof Eloquent || $this->repository->model instanceof Builder) {
            $parameters['eager'] = md5(serialize($this->repository->with));
        }

        if ($this->repository->mediator->criteria()->hasCriteria()) {
            $parameters['criteria'] = md5(serialize($this->repository->mediator->criteria()->getCriterias()));
        }

        return md5(serialize($parameters));
    }
public function cacheKey ( $ caller , array $ parameters = [ ] ) { $ parameters = compact ( 'caller' , 'parameters' ) ; if ( $ this -> repository -> model instanceof Eloquent || $ this -> repository -> model instanceof Builder ) { $ parameters [ 'eager' ] = md5 ( serialize ( $ this -> repository -> with ) ) ; } if ( $ this -> repository -> mediator -> criteria ( ) -> hasCriteria ( ) ) { $ parameters [ 'criteria' ] = md5 ( serialize ( $ this -> repository -> mediator -> criteria ( ) -> getCriterias ( ) ) ) ; } return md5 ( serialize ( $ parameters ) ) ; }
Generate and return cache key for caller with specified parameters.

@param string $caller
@param array  $parameters

@return string
Generate and return cache key for caller with specified parameters .