module Hanami::Action::Cache::CacheControl
Module with Cache-Control logic
@since 0.3.0 @api private
Constants
- HEADER
The HTTP header for Cache-Control
@since 0.3.0 @api private
Public Class Methods
included(base)
click to toggle source
@since 0.3.0 @api private
# File lib/hanami/action/cache/cache_control.rb, line 19 def self.included(base) base.class_eval do extend ClassMethods @cache_control_directives = nil end end
Public Instance Methods
finish()
click to toggle source
Finalize the response including default cache headers into the response
@since 0.3.0 @api private
Calls superclass method
# File lib/hanami/action/cache/cache_control.rb, line 52 def finish super headers.merge!(self.class.cache_control_directives.headers) unless headers.include? HEADER end