Skip Menu |

This queue is for tickets about the Cache-Memcached-LibMemcached CPAN distribution.

Report information
The Basics
Id: 46985
Status: resolved
Priority: 0/
Queue: Cache-Memcached-LibMemcached

People
Owner: Nobody in particular
Requestors: ABH [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.02009
Fixed in: (no value)



Subject: compression doesn't work
The logic for calculating the "compression savings" looks wrong. With this patch it's owrking for us again. --- a/lib/perl5/Cache/Memcached/libmemcached.pm +++ b/lib/perl5/Cache/Memcached/libmemcached.pm @@ -175,7 +175,7 @@ sub _mk_callbacks my $length = bytes::length($_); if ($length > $self->{compress_threshold}) { my $tmp = Compress::Zlib::memGzip($_); - if (1 - bytes::length($tmp) / $length < $self->{compress_savingsS}) { + if (bytes::length($tmp) / $length < 1 - $self->{compress_savingsS}) { $_ = $tmp; $_[1] |= F_COMPRESS; }
The patch is properly formatted at: https://rt.cpan.org/Ticket/Attachment/619338/314835/ Also, Adriano Ferreira pointed out that the enable_compress() stuff isn't there other than as documentation. - Ask
Patch applied. Thanks!