aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Geocode/Zurich.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/Geocode/Zurich.pm')
-rw-r--r--perllib/FixMyStreet/Geocode/Zurich.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/Geocode/Zurich.pm b/perllib/FixMyStreet/Geocode/Zurich.pm
index ca893e9d6..671da9722 100644
--- a/perllib/FixMyStreet/Geocode/Zurich.pm
+++ b/perllib/FixMyStreet/Geocode/Zurich.pm
@@ -67,7 +67,7 @@ sub string {
my $cache_dir = FixMyStreet->config('GEO_CACHE') . 'zurich/';
my $cache_file = $cache_dir . md5_hex($s);
my $result;
- if (-s $cache_file && -M $cache_file <= 7) {
+ if (-s $cache_file && -M $cache_file <= 7 && !FixMyStreet->config('STAGING_SITE')) {
$result = retrieve($cache_file);
} else {
my $search = SOAP::Data->name('search' => $s)->type('');
@@ -81,7 +81,7 @@ sub string {
}
$result = $result->result;
File::Path::mkpath($cache_dir);
- store $result, $cache_file if $result;
+ store $result, $cache_file if $result && !FixMyStreet->config('STAGING_SITE');
}
if (!$result || !$result->{Location}) {