method
handle_conditional_get!
v3.0.9 -
Show latest stable
- Class:
ActionDispatch::Http::Cache::Response
handle_conditional_get!()private
No documentation available.
# File actionpack/lib/action_dispatch/http/cache.rb, line 88
def handle_conditional_get!
if etag? || last_modified? || !@cache_control.empty?
set_conditional_cache_control!
elsif nonempty_ok_response?
self.etag = body
if request && request.etag_matches?(etag)
self.status = 304
self.body = []
end
set_conditional_cache_control!
else
headers["Cache-Control"] = "no-cache"
end
end