Class: Expires

Inherits:
Object
  • Object
show all
Defined in:
lib/restfulie/server/action_controller/trait/cacheable.rb

Instance Method Summary collapse

Instance Method Details

#do_http_cache(responder, headers) ⇒ Object



2
3
4
5
6
7
8
9
# File 'lib/restfulie/server/action_controller/trait/cacheable.rb', line 2

def do_http_cache(responder, headers)
  if responder.options[:expires_in]
    headers << "max-age=#{responder.options[:expires_in]}"
    true
  else
    false
  end
end