diff --git a/app/controllers/api/v1/locales_controller.rb b/app/controllers/api/v1/locales_controller.rb index a72d322a54..911f2d73af 100644 --- a/app/controllers/api/v1/locales_controller.rb +++ b/app/controllers/api/v1/locales_controller.rb @@ -25,7 +25,7 @@ class LocalesController < ApiController # GET /api/v1/locales # Returns a cached list of locales available def index - language_with_name = Rails.cache.fetch('locales/list', expires_in: 24.hours) do + language_with_name = Rails.cache.fetch('v3/locales/list', expires_in: 24.hours) do language_hash = {} languages = Dir.entries(Rails.root.join('app/assets/locales')).select { |file_name| file_name.ends_with?('.json') } diff --git a/app/services/provider_credentials.rb b/app/services/provider_credentials.rb index 95d5804828..6607005db9 100644 --- a/app/services/provider_credentials.rb +++ b/app/services/provider_credentials.rb @@ -30,7 +30,7 @@ def call # Cache the response for an hour # fetch will return the value if already cached, if not, it will compute the value, cache it, then return it - Rails.cache.fetch("#{@provider}/#{@route}", expires_in: 1.hour) do + Rails.cache.fetch("v3/#{@provider}/#{@route}", expires_in: 1.hour) do url = URI.parse("#{@endpoint}#{@route}?#{encoded_params}&checksum=#{checksum}") res = Net::HTTP.get_response(url) diff --git a/spec/services/provider_credentials_spec.rb b/spec/services/provider_credentials_spec.rb index c910e0e485..2f3062b5d5 100644 --- a/spec/services/provider_credentials_spec.rb +++ b/spec/services/provider_credentials_spec.rb @@ -61,7 +61,7 @@ service.call expect(service.call).to eq(['https://test.com', 'secret']) - expect(Rails.cache.read('bbb/getUser')).to eq(['https://test.com', 'secret']) + expect(Rails.cache.read('v3/bbb/getUser')).to eq(['https://test.com', 'secret']) end end end