Loading src/TagService.php +10 −2 Original line number Diff line number Diff line Loading @@ -87,9 +87,16 @@ class TagService implements TagServiceInterface { public function getTags(array $vids, $steps = 6, $size = 60, $display = NULL) { // Build the options so we can cache multiple versions. $language = $this->languageManager->getCurrentLanguage(); $options = implode('_', $vids) . '_' . $language->getId() . '_' . $steps . '_' . $size . "_" . $display; $cache_name = implode(':', [ 'tagclouds', implode('_', $vids), $language->getId(), \Drupal::request()->getRequestUri(), $steps, $size, $display, ]); // Check if the cache exists. $cache_name = 'tagclouds_cache_' . $options; $cache = $this->cacheStore->get($cache_name); $tags = []; // Make sure cache has data. Loading Loading @@ -131,6 +138,7 @@ class TagService implements TagServiceInterface { if ($size > 0) { $query->range(0, $size); } $query->addTag('tagclouds_get_tags'); $result = $query->execute()->fetchAll(); foreach ($result as $tag) { Loading Loading
src/TagService.php +10 −2 Original line number Diff line number Diff line Loading @@ -87,9 +87,16 @@ class TagService implements TagServiceInterface { public function getTags(array $vids, $steps = 6, $size = 60, $display = NULL) { // Build the options so we can cache multiple versions. $language = $this->languageManager->getCurrentLanguage(); $options = implode('_', $vids) . '_' . $language->getId() . '_' . $steps . '_' . $size . "_" . $display; $cache_name = implode(':', [ 'tagclouds', implode('_', $vids), $language->getId(), \Drupal::request()->getRequestUri(), $steps, $size, $display, ]); // Check if the cache exists. $cache_name = 'tagclouds_cache_' . $options; $cache = $this->cacheStore->get($cache_name); $tags = []; // Make sure cache has data. Loading Loading @@ -131,6 +138,7 @@ class TagService implements TagServiceInterface { if ($size > 0) { $query->range(0, $size); } $query->addTag('tagclouds_get_tags'); $result = $query->execute()->fetchAll(); foreach ($result as $tag) { Loading