From 65421acac615c6648f8f3171e679e018e8d146e1 Mon Sep 17 00:00:00 2001 From: Tyler Heald Date: Wed, 8 Nov 2023 09:34:53 -0500 Subject: [PATCH] Changing out the cache types --- indexer-app/src/cmr/indexer/data/humanizer_fetcher.clj | 4 ++-- ingest-app/src/cmr/ingest/services/humanizer_alias_cache.clj | 4 ++-- .../search/services/humanizers/humanizer_report_service.clj | 5 +---- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/indexer-app/src/cmr/indexer/data/humanizer_fetcher.clj b/indexer-app/src/cmr/indexer/data/humanizer_fetcher.clj index daf4700c62..e42b38b665 100644 --- a/indexer-app/src/cmr/indexer/data/humanizer_fetcher.clj +++ b/indexer-app/src/cmr/indexer/data/humanizer_fetcher.clj @@ -2,7 +2,7 @@ "Stores the latest humanizer json in a consistent cache." (:require [cmr.common.cache :as c] - [cmr.common.cache.single-thread-lookup-cache :as stl-cache] + [cmr.redis-utils.redis-cache :as redis-cache] [cmr.transmit.humanizer :as humanizer])) (def humanizer-cache-key @@ -12,7 +12,7 @@ (defn create-cache "Creates an instance of the cache." [] - (stl-cache/create-single-thread-lookup-cache)) + (redis-cache/create-redis-cache {:keys-to-track [humanizer-cache-key]})) (defn- retrieve-humanizers [context] diff --git a/ingest-app/src/cmr/ingest/services/humanizer_alias_cache.clj b/ingest-app/src/cmr/ingest/services/humanizer_alias_cache.clj index fd13235e66..ebf21daf3e 100644 --- a/ingest-app/src/cmr/ingest/services/humanizer_alias_cache.clj +++ b/ingest-app/src/cmr/ingest/services/humanizer_alias_cache.clj @@ -6,8 +6,8 @@ [clojure.set :as set] [clojure.string :as str] [cmr.common.cache :as cache] - [cmr.common.cache.single-thread-lookup-cache :as stl-cache] [cmr.common.util :as util] + [cmr.redis-utils.redis-cache :as redis-cache] [cmr.transmit.humanizer :as humanizer])) (def humanizer-alias-cache-key @@ -17,7 +17,7 @@ (defn create-cache "Creates an instance of the cache." [] - (stl-cache/create-single-thread-lookup-cache)) + (redis-cache/create-redis-cache {:keys-to-track [humanizer-alias-cache-key]})) (defn- humanizer-group-by-field "A custom group-by function for use in the create-humanizer-alias-map diff --git a/search-app/src/cmr/search/services/humanizers/humanizer_report_service.clj b/search-app/src/cmr/search/services/humanizers/humanizer_report_service.clj index 2045093dcf..9407e309d2 100644 --- a/search-app/src/cmr/search/services/humanizers/humanizer_report_service.clj +++ b/search-app/src/cmr/search/services/humanizers/humanizer_report_service.clj @@ -176,10 +176,7 @@ between HTTP requests for a report and Quartz cluster jobs that save report data." [] - (stl-cache/create-single-thread-lookup-cache - (fallback-cache/create-fallback-cache - (consistent-cache/create-consistent-cache) - (redis-cache/create-redis-cache)))) + (redis-cache/create-redis-cache)) (defn- create-and-save-humanizer-report "Helper function to create the humanizer report, save it to the cache, and return the content."