summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/usage_data.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/usage_data.rb b/lib/gitlab/usage_data.rb
index 46875908fa3..02750fa02e6 100644
--- a/lib/gitlab/usage_data.rb
+++ b/lib/gitlab/usage_data.rb
@@ -3,16 +3,16 @@ module Gitlab
include Gitlab::CurrentSettings
class << self
- def data
- Rails.cache.fetch('usage_data', expires_in: 1.hour) { uncached_data }
+ def data(force_refresh = false)
+ Rails.cache.fetch('usage_data', force: force_refresh) { uncached_data }
end
def uncached_data
license_usage_data.merge(system_usage_data)
end
- def to_json
- data.to_json
+ def to_json(force_refresh = false)
+ data(force_refresh).to_json
end
def system_usage_data