What causes a search_api based view to stay cached for anonymous users even after the index is updated? I have a search api based view. The index this view is based on indexes new content as soon as it is published. When new contest is published, logged in users can indeed see the latest content at the top of the search results.
However, anonymous users don't see the newly published content until the cache is cleared. How do I avoid having to manually clear the cache? What should I check?
Is it possible you have a &quot;non Drupal&quot; cache for anonymous users? Common such caches include Varnish (server based) or Cloudflare (cloud/cdn based)
Failing that, have you checked the cache settings on the view itself? I believe for search API the correct settings should be Caching: Search API (tag based) (under advanced in the view edit screen). If that doesn't work you could try turning off the views cache temporarily to at least determine if that is the root cause.
Finally check your modules are up to date, including Search API &amp; check the issue queue to see if there are any patches that may solve your issue: https://www.drupal.org/project/issues/search_api?categories

“There are only two hard things in Computer Science: cache invalidation and naming things”