Skip Menu |

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

Report information
The Basics
Id: 12400
Status: resolved
Priority: 0/
Queue: Cache-Cache

Owner: dewitt [...]
Requestors: Dan [...] DWright.Org
merlyn [...]

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

Subject: Cache::FileCache "auto_purge_on_get => 1" goes into an infinite loop
Download (untitled) / with headers
text/plain 363b
$ perl -deal DB <1> use Cache::FileCache; DB <2> x Cache::FileCache->new({auto_purge_interval => '1 hour', auto_purge_on_get => 1}); Cache::CacheUtils::Assert_Defined(/opt/perl/snap/lib/site_perl/5.8.6/Cache/ 37: if ( not defined $_[0] ) 38: { 100 levels deep in subroutine calls! Oops. And you have no tests for auto_purge_on_get either.
Download (untitled) / with headers
text/plain 132b
Sorry for not getting around to this earlier. (I guess I'm not a fan of the auto_purge methods anyway!) I'll look at it. Thanks!
Download (untitled) / with headers
text/plain 1.7k
I'm having the same problem (solution below). The problem is that _reset_auto_purge_interval loops. Here's a stack trace demonstrating the issue: Cache::BaseCache::_reset_auto_purge_interval('Cache::FileCache=HASH(0x8392a50)') called at /usr/local/lib/perl5/site_perl/5.8.4/Cache/ line 511 Cache::BaseCache::_auto_purge('Cache::FileCache=HASH(0x8392a50)') called at /usr/local/lib/perl5/site_perl/5.8.4/Cache/ line 556 Cache::BaseCache::_conditionally_auto_purge_on_get('Cache::FileCache=HASH(0x8392a50)') called at /usr/local/lib/perl5/site_perl/5.8.4/Cache/ line 198 Cache::BaseCache::get('Cache::FileCache=HASH(0x8392a50)', 'Default') called at /usr/local/lib/perl5/site_perl/5.8.4/Cache/ line 466 Cache::BaseCache::_reset_auto_purge_interval('Cache::FileCache=HASH(0x8392a50)') called at /usr/local/lib/perl5/site_perl/5.8.4/Cache/ line 625 Cache::BaseCache::set_auto_purge_interval('Cache::FileCache=HASH(0x8392a50)', '12h') called at /usr/local/lib/perl5/site_perl/5.8.4/Cache/ line 393 Cache::BaseCache::_initialize_auto_purge_interval('Cache::FileCache=HASH(0x8392a50)') called at /usr/local/lib/perl5/site_perl/5.8.4/Cache/ line 337 Cache::BaseCache::_complete_initialization('Cache::FileCache=HASH(0x8392a50)') called at /usr/local/lib/perl5/site_perl/5.8.4/Cache/ line 90 Cache::FileCache::new('Cache::FileCache', 'HASH(0x811b168)') called at t/new2.t line 17 And here's one solution that seems to work: In Cache::BaseCache, update this line in sub get: $self->_conditionally_auto_purge_on_get( ) to this: $self->_conditionally_auto_purge_on_get( ) unless $self->get_namespace() eq $AUTO_PURGE_NAMESPACE; Regards, -Dan
Download (untitled) / with headers
text/plain 108b
Thanks for the patch. I am testing it and applying it to the CVS copy right now. I'll push 1.05 out soon.

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

Please report any issues with to