/**
  * {@inheritdoc}
  */
 public function findAcl(ObjectIdentityInterface $oid, array $sids = array())
 {
     $rootOid = $this->objectIdentityFactory->root($oid);
     try {
         $acl = $this->getAcl($oid, $sids, $rootOid);
     } catch (AclNotFoundException $noAcl) {
         try {
             // Try to get ACL for underlying object
             $underlyingOid = $this->objectIdentityFactory->underlying($oid);
             $acl = $this->getAcl($underlyingOid, $sids, $rootOid);
         } catch (\Exception $noUnderlyingAcl) {
             // Try to get ACL for root object
             try {
                 $this->baseAclProvider->cacheEmptyAcl($oid);
                 return $this->baseAclProvider->findAcl($rootOid, $sids);
             } catch (AclNotFoundException $noRootAcl) {
                 throw new AclNotFoundException(sprintf('There is no ACL for %s. The root ACL %s was not found as well.', $oid, $rootOid), 0, $noAcl);
             }
         }
     }
     return $acl;
 }
 /**
  * {@inheritdoc}
  */
 public function findAcl(ObjectIdentityInterface $oid, array $sids = array())
 {
     $rootOid = $this->objectIdentityFactory->root($oid);
     try {
         $acl = $this->getAcl($oid, $sids, $rootOid);
     } catch (AclNotFoundException $noAcl) {
         try {
             // Try to get ACL for underlying object
             $underlyingOid = $this->objectIdentityFactory->underlying($oid);
             $acl = $this->getAcl($underlyingOid, $sids, $rootOid);
             // todo: Acl cache must be refactoring due task https://magecore.atlassian.net/browse/BAP-3649
             //$this->baseAclProvider->cacheWithUnderlyingAcl($oid);
         } catch (\Exception $noUnderlyingAcl) {
             // Try to get ACL for root object
             try {
                 $this->baseAclProvider->cacheEmptyAcl($oid);
                 return $this->baseAclProvider->findAcl($rootOid, $sids);
             } catch (AclNotFoundException $noRootAcl) {
                 throw new AclNotFoundException(sprintf('There is no ACL for %s. The root ACL %s was not found as well.', $oid, $rootOid), 0, $noAcl);
             }
         }
     }
     return $acl;
 }