From: Steinar H. Gunderson Date: Wed, 13 Jun 2012 13:41:58 +0000 (+0200) Subject: Increase the expiry time for the ratings page, and rely on clearing it explicitly... X-Git-Url: https://git.sesse.net/?p=wloh;a=commitdiff_plain;h=c7ded6920d791a300ecc94d4828ab3dde725fbd5 Increase the expiry time for the ratings page, and rely on clearing it explicitly after sync instead. --- diff --git a/clear-cache.pl b/clear-cache.pl new file mode 100755 index 0000000..343b47a --- /dev/null +++ b/clear-cache.pl @@ -0,0 +1,20 @@ +#! /usr/bin/perl +use DBI; +use strict; +use warnings; +no warnings qw(once); +use LWP::UserAgent; +use lib qw( include ); +require 'config.pm'; +require 'common.pm'; + +my $dbh = DBI->connect($config::local_connstr, $config::local_username, $config::local_password) + or die "connect: " . $DBI::errstr; +my $ua = LWP::UserAgent->new; + +my @locales = wloh_common::find_all_locales($dbh); + +for my $locale (@locales) { + my $url = $config::base_url . $locale . '/rating'; + $ua->get($url, -x_refresh => 'yes'); +}