Skip to content

Support get-and-touch commands #77

Description

@arodland

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:

  1. Add a param and a conditional in getFromAddr so that it supports either gets or gats using the same code path.
  2. Refactor most of GetMulti into a private method, so that the public method that's left is similarly as thin as Get or Set.
  3. Add an expiration param to the new private getMulti as well.
  4. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions