perl-Couchbase-Client
perl-Couchbase-Client copied to clipboard
counter() does not honor expiry
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.
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).