Merge remote-tracking branch 'origin/master' into merge-upstream

Conflicts:
	app/controllers/auth/confirmations_controller.rb
This commit is contained in:
David Yip
2017-12-30 17:20:07 -06:00
23 changed files with 190 additions and 27 deletions

View File

@@ -196,4 +196,13 @@ class ApplicationController < ActionController::Base
end
end
end
def render_cached_json(cache_key, **options)
data = Rails.cache.fetch(cache_key, { raw: true }.merge(options)) do
yield.to_json
end
expires_in options[:expires_in], public: true
render json: data
end
end