instance method
cache_control_headers
Ruby on Rails 4.1.16
Since v4.0.13 PrivateSignature
cache_control_headers()
No documentation comment.
Source
# File actionpack/lib/action_dispatch/http/cache.rb, line 105
def cache_control_headers
cache_control = {}
cache_control_segments.each do |segment|
directive, argument = segment.split('=', 2)
if SPECIAL_KEYS.include? directive
key = directive.tr('-', '_')
cache_control[key.to_sym] = argument || true
else
cache_control[:extras] ||= []
cache_control[:extras] << segment
end
end
cache_control
end
Defined in actionpack/lib/action_dispatch/http/cache.rb line 105
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Http::Cache::Response