Skip to content

Commit

Permalink
Changing out the cache types (#1999)
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerHeald1 authored Nov 14, 2023
1 parent ac2fff2 commit ed36ada
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
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

0 comments on commit ed36ada

Please sign in to comment.