gat and gats were added to the ASCII protocol in memcached 1.5.3 (2017-11-04). They work like get / gets and have the same response format, but have a new first argument that is an expiration time in the same format as touch.
I can implement this, the approach I would take would be:
Add a param and a conditional in getFromAddr so that it supports either gets or gats using the same code path.
Refactor most of GetMulti into a private method, so that the public method that's left is similarly as thin as Get or Set.
Add an expiration param to the new private getMulti as well.
Add GetAndTouch(key string, seconds int32) and GetAndTouchMulti(keys []string, seconds int32).
If that sounds alright, then I'll go ahead, but I figured I would check in on approach first.
gat
andgats
were added to the ASCII protocol in memcached 1.5.3 (2017-11-04). They work likeget
/gets
and have the same response format, but have a new first argument that is an expiration time in the same format astouch
.I can implement this, the approach I would take would be:
getFromAddr
so that it supports eithergets
orgats
using the same code path.GetMulti
into a private method, so that the public method that's left is similarly as thin asGet
orSet
.getMulti
as well.GetAndTouch(key string, seconds int32)
andGetAndTouchMulti(keys []string, seconds int32)
.If that sounds alright, then I'll go ahead, but I figured I would check in on approach first.