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
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 .
Have you tried using
upsert() with the
expiry option? http://docs.couchbase.com/sdk-api/couchbase-php-client-2.4.2/classes/Couchbase.Bucket.html#method_upsert