diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2019-07-25 13:51:53 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2019-07-25 13:51:53 +0300 |
commit | 4fc9254f206a683b6276c01e7b65a9216ec1a9d2 (patch) | |
tree | 1d3f9c7f681a0c40667b1271504ca7e98497fa1f /app/models/repository.rb | |
parent | 0ec40a68b73cbf14b34e55ee2a54df1f47c19cfb (diff) | |
parent | 7b76c8d644624f9a8a05e2e7a39af30c0c0c4ae0 (diff) |
Merge branch 'add-caching-to-archive-endpoint' into 'master'
Return an ETag header for the archive endpoint
See merge request gitlab-org/gitlab-ce!30581
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r-- | app/models/repository.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index 187382ad182..a89f573e3d6 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -7,6 +7,9 @@ class Repository REF_KEEP_AROUND = 'keep-around'.freeze REF_ENVIRONMENTS = 'environments'.freeze + ARCHIVE_CACHE_TIME = 60 # Cache archives referred to by a (mutable) ref for 1 minute + ARCHIVE_CACHE_TIME_IMMUTABLE = 3600 # Cache archives referred to by an immutable reference for 1 hour + RESERVED_REFS_NAMES = %W[ heads tags |