protected function fetchProcessorInstanceFromCache($cacheIdentifier, FormObject $formObject)
    {
        $cacheInstance = CacheService::get()->getCacheInstance();

        /** @var ConditionProcessor $instance */
        if ($cacheInstance->has($cacheIdentifier)) {
            $instance = $cacheInstance->get($cacheIdentifier);
            $instance->attachFormObject($formObject);
        } else {
            $instance = $this->getNewProcessorInstance($formObject);
            $instance->calculateAllTrees();

            $cacheInstance->set($cacheIdentifier, $instance);
        }

        return $instance;
    }
protected function fetchProcessorInstanceFromCache($cacheIdentifier, FormObject $formObject)
    {
        $cacheInstance = CacheService::get()->getCacheInstance();

        /** @var ConditionProcessor $instance */
        if ($cacheInstance->has($cacheIdentifier)) {
            $instance = $cacheInstance->get($cacheIdentifier);
            $instance->attachFormObject($formObject);
        } else {
            $instance = $this->getNewProcessorInstance($formObject);
            $instance->calculateAllTrees();

            $cacheInstance->set($cacheIdentifier, $instance);
        }

        return $instance;
    }
protected function fetchProcessorInstanceFromCache ( $ cacheIdentifier , FormObject $ formObject ) { $ cacheInstance = CacheService :: get ( ) -> getCacheInstance ( ) ; /** @var ConditionProcessor $instance */ if ( $ cacheInstance -> has ( $ cacheIdentifier ) ) { $ instance = $ cacheInstance -> get ( $ cacheIdentifier ) ; $ instance -> attachFormObject ( $ formObject ) ; } else { $ instance = $ this -> getNewProcessorInstance ( $ formObject ) ; $ instance -> calculateAllTrees ( ) ; $ cacheInstance -> set ( $ cacheIdentifier , $ instance ) ; } return $ instance ; }
Will either fetch the processor instance from cache, using the given
identifier, or calculate it and store it in cache.

@param string     $cacheIdentifier
@param FormObject $formObject
@return ConditionProcessor
Will either fetch the processor instance from cache using the given identifier or calculate it and store it in cache .