RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: jonathan-mui
Site: http://www.jonathanmui.com
Late reply, but...
There's json.cache!, but I couldn't get that to work. I ended up doing a Rails.cache.fetch([id, 'name']) do ... end block around the entire json response in the jbuilder file.
json.cache!
Rails.cache.fetch([id, 'name']) do ... end
Late reply, but...
There's
json.cache!
, but I couldn't get that to work. I ended up doing aRails.cache.fetch([id, 'name']) do ... end
block around the entire json response in the jbuilder file.