Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: no_cache for endpoints #1110

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions lib/travis/api/app/responders/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,7 @@ def apply
private

def cache_control
if final?
mode = endpoint.public? ? :public : :private
endpoint.expires(31536000, mode) # 1 year
else
# FIXME: Chrome WTF?
endpoint.cache_control :no_cache
end

endpoint.cache_control :no_cache
endpoint.etag cache_key if cache_key
end

Expand Down