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)
>
>