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:
Diffstat (limited to 'app/controllers/uploads_controller.rb')
-rw-r--r--app/controllers/uploads_controller.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/controllers/uploads_controller.rb b/app/controllers/uploads_controller.rb
index 2adfeab182e..635db386792 100644
--- a/app/controllers/uploads_controller.rb
+++ b/app/controllers/uploads_controller.rb
@@ -81,8 +81,13 @@ class UploadsController < ApplicationController
end
end
- def cache_publicly?
- User === model || Appearance === model
+ def cache_settings
+ case model
+ when User, Appearance
+ [5.minutes, { public: true, must_revalidate: false }]
+ when Project, Group
+ [5.minutes, { private: true, must_revalidate: true }]
+ end
end
def secret?