protected function cacheResultIfNeeded(LdapOperationInterface $operation, $result, $usedCache, $cacheKey)
    {
        if (!is_null($cacheKey) && !$usedCache) {
            /** @var CacheableOperationInterface $operation */
            $this->cache->set(new CacheItem($cacheKey, $result, $operation->getExpireCacheAt()));
        }

        return $result;
    }