Skip to content

Commit

Permalink
Always cache metadata of object in Cache, on large installations deci…
Browse files Browse the repository at this point in the history
…de to user a non-memory cache with external control
  • Loading branch information
weakbit committed Oct 10, 2023
1 parent 2f5adce commit 64374fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Classes/Driver/AmazonS3Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -1506,7 +1506,7 @@ protected function getSubObjects($identifier, $recursive = true, $filter = self:
* @param array $overrideArgs
* @return array
*/
protected function getListObjects($identifier, $overrideArgs = [], $inRecursion = false)
protected function getListObjects($identifier, $overrideArgs = [])
{
$args = [
'Bucket' => $this->configuration['bucket'] ?? '',
Expand All @@ -1517,7 +1517,7 @@ protected function getListObjects($identifier, $overrideArgs = [], $inRecursion
$metaInfoDownloadAdapter = GeneralUtility::makeInstance(MetaInfoDownloadAdapter::class);

// with many files we come to the recursion which lessens the home of a cache hit, so we do not create the cache here
if (!$inRecursion && isset($result['Contents']) && is_array($result['Contents'])) {
if (isset($result['Contents']) && is_array($result['Contents'])) {
foreach ($result['Contents'] as $content) {
$fileIdentifier = $content['Key'];
$this->normalizeIdentifier($fileIdentifier);
Expand All @@ -1535,7 +1535,7 @@ protected function getListObjects($identifier, $overrideArgs = [], $inRecursion
// Amazon S3 lists max 1000 files, so we have to get all recursive
if ($result['IsTruncated']) {
$overrideArgs['ContinuationToken'] = $result['NextContinuationToken'];
$moreResults = $this->getListObjects($identifier, $overrideArgs, true);
$moreResults = $this->getListObjects($identifier, $overrideArgs);
if (isset($moreResults['Contents'])) {
$result = $this->mergeResultArray($result, $moreResults, 'Contents');
}
Expand Down

0 comments on commit 64374fa

Please sign in to comment.