Rails Google Visualizations MySql

Im trying to get a gauge to update realtime using javascript in rails, I have got a starting point and the gauges move in realtime using a maths random function. When I try to pull the data from the database It seems that the mysql command is only being called once, it is updated once then it doesnt move again. My code is below, any help would be great. I will first post the variables first that are in the helper. [code] ############################Variables############################################# def timevariables()     Log.uncached do @oneminute = 1.minutes.ago @todaydate = 0.days.ago @yesturdaydate = 1.days.ago @lastweekdate = 1.week.ago @lastmonthdate = 1.month.ago @lastyeardate = 1.year.ago @countlogsminute = Log.count(:conditions =>{ :datetime => @oneminute..@todaydate}) @countlogs24 = Log.count(:conditions =>{ :datetime => @yesturdaydate..@todaydate}) @countlogsweek = Log.count(:conditions =>{ :datetime => @lastweekdate..@todaydate}) @countlogsmonth = Log.count(:conditions =>{ :datetime => @lastmonthdate..@todaydate}) @countlogsyear = Log.count(:conditions =>{ :datetime => @lastyeardate..@todaydate}) end end