Counters and Expiry

Hi,

It looks like bucket.Counter() only sets expiry when first creating the key and not on additional increments. I would have guessed Increment’s behavior would be the same as a Get&Set as far as expirations go - is this behavior difference intended in the Go SDK?

If it is intended is the idiomatic way of getting this behavior just preforming a Touch() after a Counter() call (it doesn’t look like there’s an atomic IncrementAndTouch() akin to GetAndTouch() unfortunately?)

Hey @calvin.linford,

This behaviour is not specific to the Go SDK. I believe it is expected that expiry does not get applied to existing documents, though I agree that the behaviour is slightly confusing and probably not what is expected. I’ll move this over to a better forum to ask questions on this behaviour.

Cheers, Brett