Skip to content
Snippets Groups Projects

Update src/EventSubscriber/CleanerCacheClearEventSubscriber.php

Open Julian Pustkuchen requested to merge issue/cleaner-2790753:2790753--error-when into 8.x-2.x
1 file
+ 3
2
Compare changes
  • Side-by-side
  • Inline
@@ -142,9 +142,10 @@ class CleanerCacheClearEventSubscriber implements EventSubscriberInterface, Cont
$query = $this->database->select('INFORMATION_SCHEMA.TABLES', 'tables');
$query->fields('tables', ['table_name', 'table_schema']);
$query->condition('table_schema', $db_name);
$query->condition('table_name', 'cache_%', 'LIKE');
// We need to do %... because of eventual table prefixes:
$query->condition('table_name', '%cache_%', 'LIKE');
// Exclude cachetags table.
$query->condition('table_name', 'cachetags', '<>');
$query->condition('table_name', '%cachetags', 'NOT LIKE');
$tables = $query->execute()->fetchCol();
}
return $tables;
Loading