You are here

public function ChainedFastBackendFactory::onKernelTerminate in Supercache 8

Same name and namespace in other branches
  1. 2.0.x src/Cache/ChainedFastBackendFactory.php \Drupal\supercache\Cache\ChainedFastBackendFactory::onKernelTerminate()

Shutdown functions.

Using __destruct() proved to be problematic with some some cache backends such as couchbase with custom transcoders or the Drupal.org test bot.

File

src/Cache/ChainedFastBackendFactory.php, line 124
Contains \Drupal\supercache\Cache\ChainedFastBackendFactory.

Class

ChainedFastBackendFactory
Defines the chained fast cache backend factory.

Namespace

Drupal\supercache\Cache

Code

public function onKernelTerminate(PostResponseEvent $event) {
  foreach ($this->caches as $cache) {
    $cache
      ->onKernelTerminate();
  }
  $this->kernel_terminated = TRUE;
}