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
Append and Prepend commands doesn't change the expire from the item (TTL), so you need either give support to touch or add the TTL support by doing the touch with the new TTL if the value isn't 0.
I did a local patch for quick fix that bug in my app.
// Fixes the bug that TTL is not apply to appendconstoldAppend=MemcachedPlusConnections.prototype.append;MemcachedPlusConnections.prototype.append=function(key,val,ttl){if(typeofttl!=='number'||ttl===0){returnoldAppend.call(this,key,val,ttl);}constnewAppend=oldAppend.call(this,key,val,ttl);returnnewAppend.then(()=>{this.write(util.format('touch %s %d noreply',key,ttl));});};
The same logic will work for your method in the prototype.
Append and Prepend commands doesn't change the expire from the item (TTL), so you need either give support to
touch
or add the TTL support by doing thetouch
with the new TTL if the value isn't 0.More info at: https://blog.elijaa.org/2010/05/21/memcached-telnet-command-summary/#append
The text was updated successfully, but these errors were encountered: