Making the browser cache an action


#1

Hi!

What HTTP headers do I have to sent to make the browser cache the
output of an action?

I tried:

request.delete(‘Cache-control’) but no luck.

It’s an action that sends an image to the browser, hence I need that.

Thanks,
Rob


#2

Wow. This is what I was looking for:

Set cache to expire in one year

expires_in 1.year

Beautiful…


#3

Robert MannI wrote:

Wow. This is what I was looking for:

Set cache to expire in one year

expires_in 1.year

Beautiful…

Where do you use expires_in? Can you set it within a controller?