Skip Menu |

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

Report information
The Basics
Id: 56142
Status: resolved
Priority: 0/
Queue: Cache-Memcached-Fast

Owner: Nobody in particular
Requestors: Shigeki.morimoto [...]

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

Subject: Can't handle Readonly scalar as expire time.
Download (untitled) / with headers
text/plain 759b
Hello kroki. We found a issue related handling Readonly scalar as expire time. Here is test program. ---------------------------------------- use Readonly; use Cache::Memcached::Fast; my $memcached = Cache::Memcached::Fast->new({ servers => [qw<localhost:11211>], }); Readonly my $x => 3; $memcached->set(foo => 100, $x); print "[$x]\n"; # $memcached->set(bar => 100, $x); for(1..5){ print "foo[", $memcached->get('foo'), "]\n"; print "bar[", $memcached->get('bar'), "]\n"; sleep(1); } ---------------------------------------- Value "bar" will expired after 3secs. But value "foo" will never expired. I wrote a patch and attached it. I hope that you accept this patch. But I'm not sure this is a right way to fix problem. Best regard.
Subject: CMF.diff.txt
Download CMF.diff.txt
text/plain 363b
--- 2010-03-31 12:38:22.000000000 +0900 +++ Fast.xs 2010-03-31 12:38:50.000000000 +0900 @@ -689,7 +689,7 @@ { /* exptime doesn't have to be defined. */ sv = ST(arg); - if (SvOK(sv)) + if (SvOK(sv) || SvMAGICAL(sv)) exptime = SvIV(sv); } if (ix != CMD_CAS)
Thanks for the report. Fixed in 0.18, which has been released just now.

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

Please report any issues with to