Implements Drupal\Core\Cache\CacheBackendInterface::garbageCollection().
Overrides CacheBackendInterface::garbageCollection
public function garbageCollection() {
try {
Database::getConnection()
->delete($this->bin)
->condition('expire', CacheBackendInterface::CACHE_PERMANENT, '<>')
->condition('expire', REQUEST_TIME, '<')
->execute();
} catch (\Exception $e) {
// If the table does not exist, it surely does not have garbage in it.
// If the table exists, the next garbage collection will clean up.
// There is nothing to do.
}
}