Skip to content

Commit

Permalink
removed single threaded cache in favor of just redis cache
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerHeald1 committed Oct 25, 2023
1 parent 8a13f34 commit 1fc30f5
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions common-app-lib/src/cmr/common_app/services/search.clj
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,17 @@
:default (* 900 1000)})

(defn create-scroll-id-cache
"Returns a single-threaded cache backed by Redis. This cache is used to store a map of cmr scroll-ids to ES scroll-ids
"Returns a cache backed by Redis. This cache is used to store a map of cmr scroll-ids to ES scroll-ids
in a consistent way acrosss all instances of search."
[]
(stl-cache/create-single-thread-lookup-cache
(redis-cache/create-redis-cache {:ttl (/ (scroll-id-cache-ttl) 1000)})))
(redis-cache/create-redis-cache {:ttl (/ (scroll-id-cache-ttl) 1000)}))

(defn create-scroll-first-page-cache
"Returns a single-threaded cache backed by Redis. This cache is used to store a map of cmr scroll-ids to the first
"Returns a cache backed by Redis. This cache is used to store a map of cmr scroll-ids to the first
page of results in a consistent way acrosss all instances of search. This is used to support scrolling with
sessions intitiated with a HEAD, GET, or POS request."
[]
(stl-cache/create-single-thread-lookup-cache
(redis-cache/create-redis-cache {:ttl (/ (scroll-first-page-cache-ttl) 1000)})))
(redis-cache/create-redis-cache {:ttl (/ (scroll-first-page-cache-ttl) 1000)}))

(defn validate-query
"Validates a query model. Throws an exception to return to user with errors.
Expand Down

0 comments on commit 1fc30f5

Please sign in to comment.