public function getEntityContextCacheKey(string $id, EntityDefinition $definition, Context $context, ?Criteria $criteria = null): string
    {
        $keys = [$this->getDefinitionCacheKey($definition), $id, $this->getContextHash($context)];

        if ($criteria && \count($criteria->getAssociations()) > 0) {
            $keys[] = md5(json_encode($criteria->getAssociations()));
        }

        return md5(implode('-', $keys));
    }
public function getEntityContextCacheKey(string $id, EntityDefinition $definition, Context $context, ?Criteria $criteria = null): string
    {
        $keys = [$this->getDefinitionCacheKey($definition), $id, $this->getContextHash($context)];

        if ($criteria && \count($criteria->getAssociations()) > 0) {
            $keys[] = md5(json_encode($criteria->getAssociations()));
        }

        return md5(implode('-', $keys));
    }
public function getEntityContextCacheKey ( string $ id , EntityDefinition $ definition , Context $ context , ? Criteria $ criteria = null ) : string { $ keys = [ $ this -> getDefinitionCacheKey ( $ definition ) , $ id , $ this -> getContextHash ( $ context ) ] ; if ( $ criteria && \ count ( $ criteria -> getAssociations ( ) ) > 0 ) { $ keys [ ] = md5 ( json_encode ( $ criteria -> getAssociations ( ) ) ) ; } return md5 ( implode ( '-' , $ keys ) ) ; }
Generates a unique entity cache key.
Considers a provided criteria with additional loaded associations and different context states.
Generates a unique entity cache key . Considers a provided criteria with additional loaded associations and different context states .