Skip Menu |

This queue is for tickets about the BackPAN-Index CPAN distribution.

Report information
The Basics
Id: 86777
Status: resolved
Priority: 0/
Queue: BackPAN-Index

People
Owner: Nobody in particular
Requestors: victor [...] vsespb.ru
Cc:
AdminCc:

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



Subject: cache does not invalidate
Actually cache_ttl does not seem to work as expected. After cache_ttl seconds cache indeed expires and new index loaded from web. But new modules never appear in database until you manually delete the cache. PoC: BackPAN::Index->new(cache_dir => $backpan_index_cache, cache_ttl => 86400)
From: victor [...] vsespb.ru
How outdated index looks: -rw-r--r-- 1 vse vse 10941336 2013-06-18 16:51 backpan-index.gz -rw-r--r-- 1 vse vse 72312858 2013-06-18 16:51 backpan-index.txt -rw-r--r-- 1 vse vse 151644160 2013-07-08 20:59 backpan.sqlite (i.e. sqlite file is new, but .txt/.gz are old) On Mon Jul 08 21:04:17 2013, vsespb wrote: Show quoted text
> Actually cache_ttl does not seem to work as expected. > > After cache_ttl seconds cache indeed expires and new index loaded from > web. > But new modules never appear in database until you manually delete the > cache. > > PoC: > > BackPAN::Index->new(cache_dir => $backpan_index_cache, cache_ttl => > 86400)
From: victor [...] vsespb.ru
My testings show that my(undef, undef, $remote_mod_time) = head($self->index_url); returns $remote_mod_time == undef and thus sub should_index_be_updated { ... return $self->index_url_mtime > $local_mod_time; is false On Mon Jul 08 21:21:07 2013, vsespb wrote: Show quoted text
> How outdated index looks: > > -rw-r--r-- 1 vse vse 10941336 2013-06-18 16:51 backpan-index.gz > -rw-r--r-- 1 vse vse 72312858 2013-06-18 16:51 backpan-index.txt > -rw-r--r-- 1 vse vse 151644160 2013-07-08 20:59 backpan.sqlite > > (i.e. sqlite file is new, but .txt/.gz are old) > > On Mon Jul 08 21:04:17 2013, vsespb wrote:
> > Actually cache_ttl does not seem to work as expected. > > > > After cache_ttl seconds cache indeed expires and new index loaded from > > web. > > But new modules never appear in database until you manually delete the > > cache. > > > > PoC: > > > > BackPAN::Index->new(cache_dir => $backpan_index_cache, cache_ttl => > > 86400)
> >
Short version, it's been fixed on the server.

Long version, an upgrade on the server brought a never version of lighttpd.  lighttpd no longer issues a Last-Modified header on a HEAD request if it doesn't know the MIME type.  http://redmine.lighttpd.net/issues/1236  I changed the configuration so it does.

The code should be more robust.  See https://github.com/book/BackPAN-Index/issues/32 about that.