Module: Grape::Rails::Cache::JsonFormatter

Defined in:
lib/grape/rails/cache/formatter.rb

Overview

For maximum performance we are fetching string from redis and return them with no parsing at all

Class Method Summary collapse

Class Method Details

.call(object, env) ⇒ Object



6
7
8
# File 'lib/grape/rails/cache/formatter.rb', line 6

def self.call(object, env)
  object.is_a?(String) ? object : MultiJson.dump(object)
end