Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Chao <mchao@gitlab.com>2018-09-06 12:48:57 +0300
committerMark Chao <mchao@gitlab.com>2018-10-30 10:44:55 +0300
commit32f9cf8ce3dd337bf3b1683c5872171c253f0d27 (patch)
treeda6f8077d458283ae1da56cbc9e282c87cdeba0a /app/models
parent6580de78bb52323fcafaaf4d2e770590e4f1c586 (diff)
Add BlobPresenter for highlighting
Force FoundBlob to use BlobPresenter
Diffstat (limited to 'app/models')
-rw-r--r--app/models/blob.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/blob.rb b/app/models/blob.rb
index e5854415dd2..425ba69c073 100644
--- a/app/models/blob.rb
+++ b/app/models/blob.rb
@@ -1,7 +1,9 @@
# frozen_string_literal: true
-# Blob is a Rails-specific wrapper around Gitlab::Git::Blob objects
+# Blob is a Rails-specific wrapper around Gitlab::Git::Blob, SnippetBlob and Ci::ArtifactBlob
class Blob < SimpleDelegator
+ include Presentable
+
CACHE_TIME = 60 # Cache raw blobs referred to by a (mutable) ref for 1 minute
CACHE_TIME_IMMUTABLE = 3600 # Cache blobs referred to by an immutable reference for 1 hour