app/controllers/rinfo_controller.rb in rinfo-0.1.4 vs app/controllers/rinfo_controller.rb in rinfo-0.2.0
- old
+ new
@@ -2,8 +2,11 @@
class RinfoController < ApplicationController
include Rails.application.routes.url_helpers
def info
- render json: Rinfo.inform!
+ json_data = ::MemoryCache.instance.fetch('rinfo_data') do
+ Rinfo.inform!
+ end
+ render json: json_data
end
end