Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def is_update_free_time(bar_index)
- cache_key = "progress_bar_#{self.experiment_id}_#{bar_index}"
- bar_last_update = Rails.cache.read(cache_key)
- Rails.logger.debug("Bar last update - #{bar_last_update}")
- Rails.cache.write(cache_key, Time.now, :expires_in => 30) if bar_last_update.nil?
- not bar_last_update.nil?
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement