2 * Implements hook_views_post_render().
4 function {{ machine_name }}_views_post_render(ViewExecutable $view, &$output, CachePluginBase $cache) {
5 // When using full pager, disable any time-based caching if there are fewer
7 if ($view->pager instanceof Drupal\views\Plugin\views\pager\Full && $cache instanceof Drupal\views\Plugin\views\cache\Time && count($view->result) < 10) {
8 $cache->options['results_lifespan'] = 0;
9 $cache->options['output_lifespan'] = 0;