]> git.sesse.net Git - wloh/commitdiff
Increase the expiry time for the ratings page, and rely on clearing it explicitly...
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 13 Jun 2012 13:41:58 +0000 (15:41 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 13 Jun 2012 13:42:08 +0000 (15:42 +0200)
clear-cache.pl [new file with mode: 0755]

diff --git a/clear-cache.pl b/clear-cache.pl
new file mode 100755 (executable)
index 0000000..343b47a
--- /dev/null
@@ -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');
+}