edge badge
Methods
D
E
L
Constants
DATE = 'Date'.freeze
 
LAST_MODIFIED = "Last-Modified".freeze
 
ETAG = "ETag".freeze
 
CACHE_CONTROL = "Cache-Control".freeze
 
SPECIAL_KEYS = Set.new(%w[extras no-cache max-age public must-revalidate])
 
DEFAULT_CACHE_CONTROL = "max-age=0, private, must-revalidate".freeze
 
NO_CACHE = "no-cache".freeze
 
PUBLIC = "public".freeze
 
PRIVATE = "private".freeze
 
MUST_REVALIDATE = "must-revalidate".freeze
 
Attributes
[R] cache_control
Instance Public methods
date()
# File actionpack/lib/action_dispatch/http/cache.rb, line 70
def date
  if date_header = get_header(DATE)
    Time.httpdate(date_header)
  end
end
date=(utc_time)
# File actionpack/lib/action_dispatch/http/cache.rb, line 80
def date=(utc_time)
  set_header DATE, utc_time.httpdate
end
date?()
# File actionpack/lib/action_dispatch/http/cache.rb, line 76
def date?
  have_header? DATE
end
etag()
Also aliased as: etag?
# File actionpack/lib/action_dispatch/http/cache.rb, line 89
def etag
  get_header ETAG
end
etag=(etag)
# File actionpack/lib/action_dispatch/http/cache.rb, line 84
def etag=(etag)
  key = ActiveSupport::Cache.expand_cache_key(etag)
  set_header ETAG, %Q("#{Digest::MD5.hexdigest(key)}")
end
etag?()
Alias for: etag
last_modified()
# File actionpack/lib/action_dispatch/http/cache.rb, line 56
def last_modified
  if last = get_header(LAST_MODIFIED)
    Time.httpdate(last)
  end
end
last_modified=(utc_time)
# File actionpack/lib/action_dispatch/http/cache.rb, line 66
def last_modified=(utc_time)
  set_header LAST_MODIFIED, utc_time.httpdate
end
last_modified?()
# File actionpack/lib/action_dispatch/http/cache.rb, line 62
def last_modified?
  have_header? LAST_MODIFIED
end