Changeset 1883

Show
Ignore:
Timestamp:
04/14/08 07:41:26 (15 months ago)
Author:
fumiakiy
Message:

Got rid of references to ThrottleSeconds and use new, appropriate config directives in search.

Location:
branches/release-34/lib/MT
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/release-34/lib/MT/App/Search.pm

    r1882 r1883  
    171171        return; 
    172172    } 
    173     $app->{cache_driver} = $cache_driver->new( ttl => $app->config->ThrottleSeconds ); 
     173    $app->{cache_driver} = $cache_driver->new( ttl => $app->config->SearchCacheTTL ); 
    174174} 
    175175 
     
    300300 
    301301    my $cache_driver = $app->{cache_driver}; 
    302     $cache_driver->set( $app->{cache_keys}{count}, $count, $app->config->ThrottleSeconds ); 
     302    $cache_driver->set( $app->{cache_keys}{count}, $count, $app->config->SearchCacheTTL ); 
    303303 
    304304    $count; 
     
    417417 
    418418    my $cache_driver = $app->{cache_driver}; 
    419     $cache_driver->set( $app->{cache_keys}{result}, $out, $app->config->ThrottleSeconds ); 
     419    $cache_driver->set( $app->{cache_keys}{result}, $out, $app->config->SearchCacheTTL ); 
    420420} 
    421421 
     
    794794    if ($tmpl eq 'feed') { 
    795795        $app->response_code(503); 
    796         $app->set_header('Retry-After' => $app->config('ThrottleSeconds')); 
     796        $app->set_header('Retry-After' => $app->config->SearchThrottleSeconds); 
    797797        $app->send_http_header("text/plain"); 
    798798        $app->{no_print_body} = 1; 
  • branches/release-34/lib/MT/Core.pm

    r1882 r1883  
    395395            'SignOnPublicKey' => { default => '', }, 
    396396            'ThrottleSeconds' => { default => 20, }, 
     397            'SearchCacheTTL'        => { default => 20, }, 
    397398            'SearchThrottleSeconds' => { default => 5 }, 
    398399            'SearchThrottleIPWhitelist' => undef,