Method: Couchbase::Collection#touch
- Defined in:
- lib/couchbase/collection.rb
#touch(id, expiry, options = Options::Touch::DEFAULT) ⇒ MutationResult
Update the expiration of the document with the given id
422 423 424 425 426 427 428 429 |
# File 'lib/couchbase/collection.rb', line 422 def touch(id, expiry, = Options::Touch::DEFAULT) resp = @backend.document_touch(bucket_name, @scope_name, @name, id, Utils::Time.extract_expiry_time(expiry), .to_backend) MutationResult.new do |res| res.cas = resp[:cas] end end |