Skip to content

Commit

Permalink
Merge pull request #8606 from nextcloud/fix/provisioning/insert-clear…
Browse files Browse the repository at this point in the history
…-cache

fix(provisioning): Clear cache before returning
  • Loading branch information
ChristophWurst authored Jul 6, 2023
2 parents fd69590 + 961533d commit 950e4c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Service/Provisioning/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,12 @@ public function provisionSingleUser(array $provisionings, IUser $user): bool {
*/
public function newProvisioning(array $data): Provisioning {
$provisioning = $this->provisioningMapper->validate($data);
return $this->provisioningMapper->insert($provisioning);
$provisioning = $this->provisioningMapper->insert($provisioning);
if ($this->cacheFactory->isAvailable()) {
$cache = $this->cacheFactory->createDistributed(self::MAIL_PROVISIONINGS);
$cache->clear();
}
return $provisioning;
}

/**
Expand Down

0 comments on commit 950e4c9

Please sign in to comment.