turned off memcache as it was causing trouble
[selectricity] / app / controllers / quickvote_controller.rb
index 5bf259caf7427d89a9149437ee52844bac93a295..eef3402c109ac813237ce739748345c9d30b02f8 100644 (file)
@@ -169,8 +169,8 @@ class QuickvoteController < ApplicationController
     @election.voters.each do |voter|
       next unless voter.ipaddress
       location=nil
-      if Cache and location=Cache.get("GEO:#{voter.ipaddress}")
-      elsif Cache
+      if defined? Cache and location=Cache.get("GEO:#{voter.ipaddress}")
+      elsif defined? Cache
         location = GeoKit::Geocoders::IpGeocoder.geocode(voter.ipaddress)
         Cache.set "GEO:#{voter.ipaddress}", location
       else

Benjamin Mako Hill || Want to submit a patch?