W3cubDocs

/Drupal 8

public function BackendChain::garbageCollection

public BackendChain::garbageCollection()

Performs garbage collection on a cache bin.

The backend may choose to delete expired or invalidated items.

Overrides CacheBackendInterface::garbageCollection

File

core/lib/Drupal/Core/Cache/BackendChain.php, line 207

Class

BackendChain
Defines a chained cache implementation for combining multiple cache backends.

Namespace

Drupal\Core\Cache

Code

public function garbageCollection() {
  foreach ($this->backends as $backend) {
    $backend->garbageCollection();
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Cache!BackendChain.php/function/BackendChain::garbageCollection/8.1.x