src/LdapTools/Operation/Invoker/LdapOperationInvoker.php
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;
    }
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;
    }
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 ; }
Cache the result of the operation if needed.

@param LdapOperationInterface $operation
@param mixed $result
@param bool $usedCache
@param string|null $cacheKey
@return mixed
Cache the result of the operation if needed .