I want to get the previous value from the map at a given map key when doing a put operation. I could do a read first, but the extra network roundtrip overhead and the underlying cost of the server reading the map twice (one for each of these operations) is undesirable. I there a best practice for this scenario? Is there another way of accomplishing this other than a read before write? I was hoping I could send both Operations as a batch, but the documentation indicates that the read would happen AFTER the write, and I want it to happen BEFORE the write.
I’d love to be able to pass a MapReturnType to the put operation to indicate that I want the old data returned.