Skip to content

Commit

Permalink
[BUGFIX] Update local cache upon creation of new storage object
Browse files Browse the repository at this point in the history
When a new storage object for the "local" driver is being created
it is not possible to retrieve the new object instantaneous. The
objects are being cached in a local static variable which needs
to get flushed (set to "null") first.

Resolves: #86689
Resolves: #62273
Releases: master
Change-Id: Ib5a0d6b148ef7b503c26ccd1610519707a8fa86d
Reviewed-on: https://review.typo3.org/56058
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
  • Loading branch information
Bernhard Kraft authored and wouter90 committed Oct 28, 2018
1 parent 02f8414 commit 5715465
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions typo3/sysext/core/Classes/Resource/StorageRepository.php
Expand Up @@ -230,6 +230,9 @@ public function createLocalStorage($name, $basePath, $pathType, $description = '
->getConnectionForTable($this->table);
$dbConnection->insert($this->table, $field_values);

// Flush local resourceStorage cache so the storage can be accessed during the same request right away
$this->storageRowCache = null;

return (int)$dbConnection->lastInsertId($this->table);
}

Expand Down

0 comments on commit 5715465

Please sign in to comment.