# Add expire header for images stored in amazon s3

**URL:** <https://www.ruby-forum.com/t/add-expire-header-for-images-stored-in-amazon-s3/222620>\
**Category:** Rails\
**Created:** [September 4, 2012, 6:55am UTC](https://www.ruby-forum.com/t/add-expire-header-for-images-stored-in-amazon-s3/222620 "2012-09-04T06:55:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [September 4, 2012, 6:55am UTC](https://www.ruby-forum.com/t/add-expire-header-for-images-stored-in-amazon-s3/222620/1 "2012-09-04T06:55:18Z")

</div>

Hello everyone Good Morning,

I done adding expire header by put the following code into my product  
model.

```
:s3_headers => { 'Cache-Control' => 'max-age=315576000', 'Expires' 

```

=\>  
10.years.from\_now.httpdate },

But its work only while i add new product and image.  
Already i have 100 of products and images. How can i add expire header  
for those which already exist products.

Please advice.

Regards  
Saravanan P
