Instantly share code, notes, and snippets.

Embed
What would you like to do?
def around_api_response(api_template)
Rails.cache.fetch("api_response_#{self.class.to_s}_#{id}_#{api_template.to_s}", :expires_in => 1.hour) do
yield
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment