Page caching different formats for same action?

If I have an action which can render multiple formats (e.g. html, js,
rss), is it possible to page-cache all of these formats?

I can't see how to do it with 'caches_page'. It looks like you can
only override 'page_cache_extension' at the class level:

I'd like to dynamically tie the page_cache_extension to my format
somehow. Is this possible?

-- Chad

this definitely worked for me last time I tried.
Notably you'd need the format in the path.

/some/action.js should be correctly cached as /public/some/action.js