I have a view display block that needs to be updated every 8 hours. I tried Views Custom Cache Tag module https://www.drupal.org/project/views_custom_cache_tag but I could not make it work. I set my tag for the view block display and then invalidate this tag with the each API call, but the block does not get updated. I am looking for programmatical solution of flushing the cache of view blocks without changing the rest of the content.
use Drupal\Core\Cache\CacheTagsInvalidatorInterface; $tags = ['view:catchme-tag']; $this->cacheTagsInvalidator->invalidateTags($tags);