You are here

public function ExampleViewsEventSubscribers::postRender in Hook Event Dispatcher 8

Post render event handler.

Parameters

\Drupal\hook_event_dispatcher\Event\Views\ViewsPostRenderEvent $event: The event.

File

src/Example/ExampleViewsEventSubscribers.php, line 140

Class

ExampleViewsEventSubscribers
Class ExampleViewsEventSubscribers.

Namespace

Drupal\hook_event_dispatcher\Example

Code

public function postRender(ViewsPostRenderEvent $event) {
  $cache = $event
    ->getCache();

  // Do something with the cache settings.
  $cache->options['results_lifespan'] = 0;
}