Cached pages and content negotiation


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 caches.

Any ideas, anybody? Thanks. -Sebastian