Skip to content

Instantly share code, notes, and snippets.

@rduarte
Created August 30, 2011 19:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rduarte/1181862 to your computer and use it in GitHub Desktop.
Save rduarte/1181862 to your computer and use it in GitHub Desktop.
expire_fragment(fragmentname)
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