````
coder = if value.respond_to?(:to_a)
  value = value.to_a
  value.map {|obj| coder_from_record(obj) }
else
  coder_from_record(value)
end

Rails.cache.write(key, coder)
coder
````