I have a program that indexes multiple documents into OpenSearch every second. I make these documents available to query on a dashboard with a fixed set of filters. From what I've read online, OpenSearch will cache the results of queries.
When I index a new document or update an existing document, do I need to explicitly clear the index cache for the new (or updated) document to be available immediately after the index's refresh period elapses, or is the cache smart enough to know that the index has been updated?
My goal here is to prevent outdated data from being returned upon explicit requests, but I'd still like to cache it in the case that multiple users attempt to query the documents when no change has occurred.