upstash-sync-token
header. Each time you make a request, save the value of the upstash-sync-token
header from the response and pass it in the upstash-sync-token
header of your next request. This ensures that subsequent reads reflect the writes.
read
request before it receives the write
update from the primary replica. To avoid this, if you are using @upstash/redis
version 1.34.1 or later, you can pass the readYourWritesSyncToken
from the first client to the second:
Redis._sync_token
instead of readYourWritesSyncToken
.