diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-08-30 12:34:41 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-08-30 12:34:41 +0000 |
commit | 3113fb848001fdea3a039295002d7752b0feebbb (patch) | |
tree | e73ba9b241027664a1e27d5778cbd18c0e5a9434 /app/helpers | |
parent | b8856d662942f54d7353e69505be08deb9b1d575 (diff) | |
parent | edb5759caf8c328803fdc04e3ae520d234edfcfc (diff) | |
download | gitlab-ce-3113fb848001fdea3a039295002d7752b0feebbb.tar.gz |
Merge branch 'fj-47229-fix-logo-lfs-tracked' into 'master'
Fixed project logo when it is LFS tracked
Closes #47229
See merge request gitlab-org/gitlab-ce!20948
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/blob_helper.rb | 22 |
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) |