Issue #2186557 by andypost: DatabaseBackend::garbageCollection() should use injected database.
parent
8fe0fd00a5
commit
aba98c7388
|
@ -8,7 +8,6 @@
|
|||
namespace Drupal\Core\Cache;
|
||||
|
||||
use Drupal\Core\Database\Connection;
|
||||
use Drupal\Core\Database\Database;
|
||||
use Drupal\Core\Database\SchemaObjectExistsException;
|
||||
|
||||
/**
|
||||
|
@ -311,7 +310,7 @@ class DatabaseBackend implements CacheBackendInterface {
|
|||
*/
|
||||
public function garbageCollection() {
|
||||
try {
|
||||
Database::getConnection()->delete($this->bin)
|
||||
$this->connection->delete($this->bin)
|
||||
->condition('expire', Cache::PERMANENT, '<>')
|
||||
->condition('expire', REQUEST_TIME, '<')
|
||||
->execute();
|
||||
|
|
Loading…
Reference in New Issue