From edb5759caf8c328803fdc04e3ae520d234edfcfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Javier=20L=C3=B3pez?= Date: Thu, 30 Aug 2018 12:34:41 +0000 Subject: Fixed project logo when it is LFS tracked --- app/helpers/blob_helper.rb | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'app/helpers/blob_helper.rb') diff --git a/app/helpers/blob_helper.rb b/app/helpers/blob_helper.rb index b61cbd5418a..00ebafd177b 100644 --- a/app/helpers/blob_helper.rb +++ b/app/helpers/blob_helper.rb @@ -157,28 +157,6 @@ module BlobHelper end end - def cached_blob? - stale = stale?(etag: @blob.id) # The #stale? method sets cache headers. - - # Because we are opionated we set the cache headers ourselves. - response.cache_control[:public] = @project.public? - - response.cache_control[:max_age] = - if @ref && @commit && @ref == @commit.id - # This is a link to a commit by its commit SHA. That means that the blob - # is immutable. The only reason to invalidate the cache is if the commit - # was deleted or if the user lost access to the repository. - Blob::CACHE_TIME_IMMUTABLE - else - # A branch or tag points at this blob. That means that the expected blob - # value may change over time. - Blob::CACHE_TIME - end - - response.etag = @blob.id - !stale - end - def licenses_for_select return @licenses_for_select if defined?(@licenses_for_select) -- cgit v1.2.1