How to set the expiration date for a FB Channel File in Rails 3

I am creating the channelfile for FB

cache_expire = 60*60*24*365
response.headers["Pragma"] = "public"
response.headers["Cache-Control"] = "max-age=#{cache_expire}"
response.headers["Expires"] = ... # gmdate('D, d M Y H:i:s', time()+$cache_expire) . ' GMT');

How do I set the "Expires" value in Rails 3?

Answers


 response.headers["Expires"] = Time.at(Time.now.to_i + cache_expire).strftime("%D, %d %M % Y %H:%i:%s)

Need Your Help

Friends email form google Plus

ios iphone objective-c google-plus

I am integrating google plus in my app.

Strings to binary files

c++ string file binary

My problem goes like this: I have a class called 'Register'. It has a string attribute called 'trainName' and its setter: