protected function _beforeRepositoryFetch(AnCommandContext $context)
    {
        if ($this->_enable) {
            $key = $this->_getCacheKey($context->query);

            if (self::$_cache->offsetExists($key)) {
                $context->data = self::$_cache->offsetGet($key);

                return false;
            }
        }
    }
protected function _beforeRepositoryFetch(AnCommandContext $context)
    {
        if ($this->_enable) {
            $key = $this->_getCacheKey($context->query);

            if (self::$_cache->offsetExists($key)) {
                $context->data = self::$_cache->offsetGet($key);

                return false;
            }
        }
    }
protected function _beforeRepositoryFetch ( AnCommandContext $ context ) { if ( $ this -> _enable ) { $ key = $ this -> _getCacheKey ( $ context -> query ) ; if ( self :: $ _cache -> offsetExists ( $ key ) ) { $ context -> data = self :: $ _cache -> offsetGet ( $ key ) ; return false ; } } }
Check the object cache see if the data has already been retrieved.

This cache is only persisted throughout a request

@param AnCommandContext $context
Check the object cache see if the data has already been retrieved .