summaryrefslogtreecommitdiff
path: root/app/helpers/blob_helper.rb
diff options
context:
space:
mode:
authorFrancisco Javier López <fjlopez@gitlab.com>2018-08-30 12:34:41 +0000
committerSean McGivern <sean@mcgivern.me.uk>2018-08-30 12:34:41 +0000
commitedb5759caf8c328803fdc04e3ae520d234edfcfc (patch)
treee73ba9b241027664a1e27d5778cbd18c0e5a9434 /app/helpers/blob_helper.rb
parentb8856d662942f54d7353e69505be08deb9b1d575 (diff)
downloadgitlab-ce-edb5759caf8c328803fdc04e3ae520d234edfcfc.tar.gz
Fixed project logo when it is LFS tracked
Diffstat (limited to 'app/helpers/blob_helper.rb')
-rw-r--r--app/helpers/blob_helper.rb22
1 files changed, 0 insertions, 22 deletions
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)