diff --git a/core/modules/system/src/Tests/KeyValueStore/GarbageCollectionTest.php b/core/modules/system/src/Tests/KeyValueStore/GarbageCollectionTest.php index 7fbb265..6b46b7c 100644 --- a/core/modules/system/src/Tests/KeyValueStore/GarbageCollectionTest.php +++ b/core/modules/system/src/Tests/KeyValueStore/GarbageCollectionTest.php @@ -29,7 +29,7 @@ class GarbageCollectionTest extends KernelTestBase { protected function setUp() { parent::setUp(); - // The additional tables are necessary due to the call to system_cron(). + // These additional tables are necessary due to the call to system_cron(). $this->installSchema('system', array('key_value_expire', 'flood', 'queue')); } diff --git a/core/modules/system/system.module b/core/modules/system/system.module index c95fc3c..dbbfd45 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -1143,22 +1143,22 @@ function system_get_module_admin_tasks($module, array $info) { /** * Implements hook_cron(). * - * Remove older rows from flood and batch table. Remove old temporary files. + * Remove older rows from flood, batch cache and expirable keyvalue tables. */ function system_cron() { - // Cleanup the flood. + // Clean up the flood. \Drupal::flood()->garbageCollection(); foreach (Cache::getBins() as $cache_backend) { $cache_backend->garbageCollection(); } - // Cleanup the expirable key value database store. + // Clean up the expirable key value database store. if (\Drupal::service('keyvalue.expirable.database') instanceof KeyValueDatabaseExpirableFactory) { \Drupal::service('keyvalue.expirable.database')->garbageCollection(); } - // Cleanup the queue for failed batches. + // Clean up the queue for failed batches. db_delete('queue') ->condition('created', REQUEST_TIME - 864000, '<') ->condition('name', 'drupal_batch:%', 'LIKE')