Forum: Ruby on Rails Cached pages and content negotiation

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
sebastian (Guest)
on 2008-10-10 16:45
(Received via mailing list)

I seem to be unable to get the server (Apache 2.0.61 with Phusion
Passenger 2.0.3) to return cached non-html pages.
My application caches RDF-XML files in the file system with an .rdf
extension. The URLs to retrieve the data (I'm using ActiveRecords, not
ActiveResources) don't use file extensions, so I am calling
'ActionController::Base.page_cache_extension = ".rdf"' from the
controller. My requests have a header "Accept: application/rdf+xml"
and I've added "AddType application/rdf+xml .rdf" to /
public's .htaccess file.
Albeit the server never returns the cached pages, instead rails sends
a new response.

When I change the file extension of a cached file to .html and use a
browser to request the data, the cached file is returned. So some sort
of content negotiation is at work here, but it only works for html

Any ideas, anybody?
This topic is locked and can not be replied to.