Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View rails_expire_fragment_cache.rb
1 2 3 4 5 6 7 8
fragment_cache = read_fragment(fragmentname)
 
if(not fragment_cache)
fragment_cache = Sparklines.plot(ary,params)
write_fragment(fragmentname,fragment_cache)
end
 
send_data(fragment_cache, :disposition => 'inline', :type => 'image/png')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.