don't cache non-final services

This commit is contained in:
Konstantin Haase 2012-10-23 21:47:32 +02:00
parent 0283735471
commit ca47b31904

View File

@ -14,8 +14,9 @@ module Travis::Api::App::Responders
private
def cache_control
return unless final? # FIXME
mode = [endpoint.public? ? :public : :private]
mode << :must_revalidate unless final?
mode << :must_revalidate #unless final?
endpoint.expires(31536000, *mode) # 1 year
endpoint.etag resource.cache_key if cache_key?
endpoint.last_modified resource.updated_at if updated_at?