Avoid clearing the cache while saving it on parallel (#1616)

This commit is contained in:
Zing 2022-01-03 13:08:38 +08:00 committed by GitHub
parent b76243b416
commit 9baf531477
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,6 +113,10 @@ final class ChangedFilesDetector
private function invalidateCacheIfConfigurationChanged(string $key, string $configurationHash): void
{
$oldCachedValue = $this->cache->load($key, CacheKey::CONFIGURATION_HASH_KEY);
if ($oldCachedValue === null){
return;
}
if ($oldCachedValue === $configurationHash) {
return;
}