/** * {@inheritdoc} */ public function cacheSet($type) { if ($type != 'results') { parent::cacheSet($type); return; } $data = array('result' => $this->view->result, 'total_rows' => isset($this->view->total_rows) ? $this->view->total_rows : 0, 'current_page' => $this->view->getCurrentPage(), 'search_api results' => $this->getQuery()->getSearchApiResults()); \Drupal::cache($this->resultsBin)->set($this->generateResultsKey(), $data, $this->cacheSetMaxAge($type), $this->getCacheTags()); }