From 5437727517a891b1b2739556120f89b49debf89d Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Mon, 17 Apr 2023 14:29:24 +0200 Subject: [PATCH] chore(api-geo): bump cache keys --- app/services/api_geo_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/api_geo_service.rb b/app/services/api_geo_service.rb index d4982e362..e14979e3d 100644 --- a/app/services/api_geo_service.rb +++ b/app/services/api_geo_service.rb @@ -79,7 +79,7 @@ class APIGeoService private def communes_by_postal_code_map - Rails.cache.fetch('api_geo_communes', expires_in: 1.week) do + Rails.cache.fetch('api_geo_communes_v2', expires_in: 1.week) do departements .filter { _1[:code] != '99' } .flat_map { communes(_1[:code]) } @@ -88,7 +88,7 @@ class APIGeoService end def get_from_api_geo(scope) - Rails.cache.fetch("api_geo_#{scope}", expires_in: 1.week) do + Rails.cache.fetch("api_geo_#{scope}_v2", expires_in: 1.week) do JSON.parse(Rails.root.join('lib', 'data', 'api_geo', "#{scope}.json").read, symbolize_names: true) end end