protected function clearParents(TaxonomyTermInterface $term) { if ($term->hasParent()) { $parent = $term->getParent(); $this->cacheService->clearByTags(['route_taxonomy/term/get', 'param_term_' . $parent->getId()]); $this->clearParents($parent); } }
protected function clearTaxonomyTerms(Collection $collection) { foreach ($collection as $term) { if ($term instanceof TaxonomyTermInterface) { $this->cacheService->clearByTags(['route_taxonomy/term/get', 'param_term_' . $term->getId()]); } } }
public function testClearByTagsIsSkippedForNonTaggableStorageAdapters() { $this->cacheService->clearByTags(array('foo')); }