This is in JavaScript API 4.21.
I am using queryFeatures to retrieve a recently updated feature to be highlighted and displayed on top of the feature layer from which the layer was queried. This used to work but now queryFeatures is returning old features from before the update. If I clear the browser's cache and reload the page then queryFeatures would return the updated version of the features. I verified from the API that the feature were updated when queryFeatures() was run. It is like the method was run against a cached version of the layer.
This is odd because it is only doing this for three of the layers. The other layers on the same service works fine.
Is there a way to run queryFeatures that forces the layer to get the data from the server and not the cache?
Thanks.