Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMR-9501: Transfer the humanizer caches from Search, Ingest, and Indexer to Redis #1999

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions indexer-app/src/cmr/indexer/data/humanizer_fetcher.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions ingest-app/src/cmr/ingest/services/humanizer_alias_cache.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down