You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Memcached has some new 'meta commands' that extend the text protocol, but do not appear to be supported in memcached-client (and presumably not in the njs server either. I'm not sure if the parser would need changes.)
No command action defined for [ 'HD', 't31' ]
error Error: Command timeout
[stack trace]
(In the command, mg is for "meta get", t indicates that I want the expiration time. In the response, HD indicates that there is no value, only headers, and t31 indicates that there are 31 seconds left until the expiration.)
I also tried adding the v flag to request a value in addition to the expiration time. It sort-of worked, in that it returned the value rather than timing out. But it still complained rather than returning the expiration time:
No command action defined for [ 'VA', '1', 't60' ]
success 2
I particularly want the Meta Arithmetic command so that I can use it in the rate-limit-memcached rewrite that we're working on to do an "upsert" increment and retrieve the value and TTL all in a single command.
I'd be willing to do some of the work to add these new commands, but I thought it would be smart to start a discussion here to plan out the overall shape of things.
The text was updated successfully, but these errors were encountered:
Memcached has some new 'meta commands' that extend the text protocol, but do not appear to be supported in memcached-client (and presumably not in the njs server either. I'm not sure if the parser would need changes.)
There is an overview at https://github.com/memcached/memcached/wiki/MetaCommands
They are fully documented here:
me
mg
ms
md
ma
mn
I tried using
cmd()
with a meta command to retrieve the expiration time of a key that I had previously set:but it logs an error and then times out:
(In the command,
mg
is for "meta get",t
indicates that I want the expiration time. In the response,HD
indicates that there is no value, only headers, andt31
indicates that there are 31 seconds left until the expiration.)I also tried adding the
v
flag to request a value in addition to the expiration time. It sort-of worked, in that it returned the value rather than timing out. But it still complained rather than returning the expiration time:I particularly want the Meta Arithmetic command so that I can use it in the rate-limit-memcached rewrite that we're working on to do an "upsert" increment and retrieve the value and TTL all in a single command.
I'd be willing to do some of the work to add these new commands, but I thought it would be smart to start a discussion here to plan out the overall shape of things.
The text was updated successfully, but these errors were encountered: