def self.current_event(opts = {})
@current_event ||= begin
...
...which creates a single Event instance that lives as long as Rails is running. This makes the schedule fail to update when sessions are changed, forcing us to restart the dynos. I’m pretty sure it’s also just totally unsafe to hold an ActiveRecord object across requests.
We should do away with this caching and switch schedule to use memcache (which would also save on the fairly substantial rendering time for that page).
Event
does this:...which creates a single Event instance that lives as long as Rails is running. This makes the schedule fail to update when sessions are changed, forcing us to restart the dynos. I’m pretty sure it’s also just totally unsafe to hold an ActiveRecord object across requests.
We should do away with this caching and switch schedule to use memcache (which would also save on the fairly substantial rendering time for that page).