Skip Menu |
 

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

Report information
The Basics
Id: 49913
Status: resolved
Priority: 0/
Queue: Cache-Memcached-Managed

People
Owner: ELIZABETH [...] cpan.org
Requestors: dchand3 [...] gmail.com
Cc:
AdminCc:

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



Subject: Expiration does not work with straight numerics
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: text/plain
Charset: utf8
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 2965
Download (untitled) / with headers
text/plain 2.8k
I found that cache expiration was not working. It was set to a single day (30*30*24), it does not work. The documentation states:expiration specification "Expiration can be specified in seconds, but, for convenience, can also be specified in days, hours and minutes (and seconds). This is indicated by a number, immediately followed by a letter D (for days) or H (for hours) or M (for minutes) or S (for seconds). For example: 2D3H means 2 days and 3 hours, which means 183600 seconds." ONLY the "convenience" designation works. See the modified tests below along with the result... Note it does not matter if the seconds are expressed with or without quotes both ways without the letter fail. # Check expiration my $value1 ='Fish'; ok( $cache->set( value => $value, expiration => '3s' ), "Simple value for expiration check" ); is( $cache->get, $value, "Check if simple getting before expiration works" ); sleep 5; ok( !defined $cache->get, "Check if simple getting after expiration fails" ); # check expiration with basic seconds no sdhw ok( $cache->set( value => $value1, expiration => '3' ), "Simple value for expiration check" ); is( $cache->get, $value1, "Check if simple getting before expiration works" ); sleep 5; ok( !defined $cache->get, "Check if simple getting after expiration fails" ); [dana@dchandler-ln at 12:49 PM on Tue Sep 22] <In ~/build/src/p/Cache-Memcached-Managed-0.20 executing command #42 > make test PERL_DL_NONLAZY=1 /home/dana/etp/perl/5.10.0/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/001basic.......ok 5/179# # Started memcached server Use of uninitialized value $line in send at /home/dana/etp/cpan/5.10.0/p/Cache/Memcached.pm line 373. t/001basic.......ok 7/179Use of uninitialized value $line in send at /home/dana/etp/cpan/5.10.0/p/Cache/Memcached.pm line 373. t/001basic.......ok 37/179 # Failed test 'Check if simple getting after expiration fails' # at t/001basic.t line 184. t/001basic.......NOK 127/179 # Failed test 'Check if simple getting after expiration fails' # at t/001basic.t line 184. t/001basic.......ok 130/179# # Stopped memcached server # Looks like you planned 179 tests but ran 3 extra. # Looks like you failed 2 tests of 182 run. t/001basic.......dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 40, 127, 180-182 Failed 5/179 tests, 97.21% okay -- :: Dana C. Chandler III | Principal E.T.P. Engineer :: e-Dialog | dchandler@e-dialog.com :: 65 Network Drive | Burlington, MA 01803 :: v: 781-372-3355 | f: 781-863-8118 :: m: 339-223-1594 | www.e-dialog.com
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-19829-1337896947-1510.49913-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 34
Fixed in version 0.24, now on CPAN


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.