Couchbase Memcached bucket key deletion and setting TTl for key

Is there any way to set ttl for key inserted in memcached bucket or to drop them. I can set them using .set() method but is there any way of droping them or setting ttl while inserting document.I am using php sdk

There is the touch method. I’m not sure I follow your question though, as you’re saying “setting ttl while inserting document”, but above that you say you can use the .set() method.

Maybe offer a code sample of what you’d like to do?

@ingenthr sorry for replying this late was busy, I was able to set ttl for any documnet using .set method available in PHP sdk. thanks again .

1 Like

Have you tried using upsert() with the expiry option?