perl-Couchbase-Client icon indicating copy to clipboard operation
perl-Couchbase-Client copied to clipboard

counter() does not honor expiry

Open rrb3942 opened this issue 9 years ago • 1 comments

Trying to use the counter() method I found that documents weren't expiring as expected. Tests using upsert instead do show documents properly expiring.

Example: my $counter = Couchbase::Document->new($_[0], 1, { expiry => 10 }); $rl->counter($counter, { initial => 1, delta => 1 });

Results in a document that never expires. Should expire in 10 seconds.

rrb3942 avatar Nov 12 '15 00:11 rrb3942

Looks like it works with a regular document (after some trial and error). However, getting expiry()value on a newly retrieved document returns nothing, even if expiry is set (and the document is retrieved before it correctly ages out of Couchbase).

ivulfson avatar Jan 05 '16 21:01 ivulfson