we throw a lot of stats at our users. new ones everyweek! and sometimes these stats don't behave quite the way you'd hope in production and you end up with the mountain of doom that you see at left:
Rails.cache.fetch(CACHE_TAG, :expires_in => 1800) do
the cacheable line calculated a slow moving sub-stat that was added to the super-useful stat. we still were able to give a good realtime stat, with a tiny accuracy "bump" every 30 minutes. don't tell, and no one will notice.
mountain of doom annihilated. database happy. back to kicking butt.