Closed kjgarza closed 7 years ago
The index_controller should have this line to initialize model:
@metadata = Metadata.new(input: @id, from: from, format: format)
And both from and format defined in the controller before the call:
format = Mime::Type.lookup(@content_type).to_sym
from = Bolognese.find_from_format(id: @id)
In metadata model change line to
def initialize(input: nil, from: nil, format: nil)
# don't cache if passing thru metadata or when in Test mode
return super(input: input, from: from) if from == format.to_s || %w(test).include?(Rails.env)
Fixed with commit c0220b4425275e3457158d8926c721ac095f26a1
Caching in different content format is breaking CN XML request
To add logic to bypass caching on application/vnd.datacite.datacite+xml content