Skip to content

Commit 3fdaf9a

Browse files
committed
aggiunti controlli anche sul timestamps
1 parent 1d877b3 commit 3fdaf9a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Console/ProcessCacheInvalidationEventsCommand.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,8 @@ protected function updateLastInvalidationTimes(array $identifiers): void
303303
[$type, $identifier] = explode(':', $key, 2);
304304
// Anche qui non si può usare la partizione perchè nel caso dell'update potrebbe non essere la partizione giusta temporalmente
305305
//$partitionCache_invalidation_timestamps = $this->helper->getCacheInvalidationTimestampsPartitionName();
306+
DB::statement('SET FOREIGN_KEY_CHECKS=0;');
307+
DB::statement('SET UNIQUE_CHECKS=0;');
306308

307309
DB::table('cache_invalidation_timestamps')
308310
//DB::table(DB::raw("`cache_invalidation_timestamps` PARTITION ({$partitionCache_invalidation_timestamps})"))
@@ -311,6 +313,10 @@ protected function updateLastInvalidationTimes(array $identifiers): void
311313
['last_invalidated' => $now]
312314
)
313315
;
316+
317+
// Riattiva i controlli
318+
DB::statement('SET UNIQUE_CHECKS=1;');
319+
DB::statement('SET FOREIGN_KEY_CHECKS=1;');
314320
}
315321
}
316322

0 commit comments

Comments
 (0)