After I post a new entity to the datastore, I redirect the page to a new URL that lists all of the entities in that group. When I redirect, the page shows stale results and I have to reload to see the new list of entities in the datastore.
I know about eventual consistency. Is that why I'm seeing the stale result?
For example,
my datastore my have one user - User 1 Then, in a form, I add a user - User 2 This entity is put to the datastore and then I redirect to a new url, i.e. 'get/users'
On the redirect I only see User 1, but if I refresh the page I see User 2. Any way I can guarantee or help to prevent the stale results?
If you test your redirect rules in the staging environment of your old website, you only have to push them live for the migration, without worrying about changing the implementation from the staging site of the new website to the old domain.
Test your redirects on your staging website before the new website goes live in order to minimise the risk of going live with faulty redirects. Testing your redirects before the migration does not eliminate the need to test them after the migration. Collect all URLs that have clicks, impressions, sessions from organic search and backlinks.
Use ExpectedConditions.refreshed to avoid StaleElementReferenceException and retrieve the element again. This method updates the element by redrawing it and we can access the referenced element.
Cause 1: The referenced web element has been deleted completely. Stale means old, decayed, no longer fresh. Stale Element means an old element or no longer available element.
Yes, this is caused by "eventual consistency" as you put it.
I have a few recommendations:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With