Changeset 1757

Show
Ignore:
Timestamp:
10/15/06 17:48:46
Author:
miyagawa
Message:

GuessTimeZoneByDomain?: added caching to IP::Country

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/Filter/GuessTimeZoneByDomain.pm

    r1755 r1757  
    5757 
    5858    if ($self->{ip_country}) { 
    59         my $ccip = $self->{ip_country}->inet_atocc($host); 
     59        my $ccip = $self->cache->get_callback( 
     60            $host, 
     61            sub { $self->{ip_country}->inet_atocc($host) }, 
     62            '1 day', 
     63        ); 
    6064        if ($ccip) { 
    6165            my @names = DateTime::TimeZone->names_in_country($ccip);