From 95cf36aec741d6e83a17beb4d456f7d0256b5907 Mon Sep 17 00:00:00 2001 From: agravell047 Date: Tue, 26 Mar 2024 17:49:47 -0400 Subject: [PATCH] removed cache busting for mobile rx --- lib/rx/client.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/rx/client.rb b/lib/rx/client.rb index c3a9fe4780f..4e62136e59a 100644 --- a/lib/rx/client.rb +++ b/lib/rx/client.rb @@ -18,6 +18,7 @@ class Client < Common::Client::Base client_session Rx::ClientSession CACHE_TTL = 3600 * 1 # 1 hour cache + CACHE_TTL_ZERO = 0 def request(method, path, params = {}, headers = {}, options = {}) super(method, path, params, headers, options) @@ -31,7 +32,7 @@ def request(method, path, params = {}, headers = {}, options = {}) # @return [Common::Collection[Prescription]] # def get_active_rxs - Common::Collection.fetch(::Prescription, cache_key: cache_key('getactiverx'), ttl: CACHE_TTL) do + Common::Collection.fetch(::Prescription, cache_key: cache_key('getactiverx'), ttl: CACHE_TTL_ZERO) do perform(:get, 'prescription/getactiverx', nil, token_headers).body end end @@ -53,7 +54,7 @@ def get_active_rxs_with_details # @return [Common::Collection[Prescription]] # def get_history_rxs - Common::Collection.fetch(::Prescription, cache_key: cache_key('gethistoryrx'), ttl: CACHE_TTL) do + Common::Collection.fetch(::Prescription, cache_key: cache_key('gethistoryrx'), ttl: CACHE_TTL_ZERO) do perform(:get, 'prescription/gethistoryrx', nil, token_headers).body end end @@ -123,10 +124,7 @@ def get_tracking_history_rx(id) # @return [Faraday::Env] # def post_refill_rxs(ids) - if (result = perform(:post, 'prescription/rxrefill', ids, token_headers)) - Common::Collection.bust([cache_key('getactiverx'), cache_key('gethistoryrx')]) - end - result + perform(:post, 'prescription/rxrefill', ids, token_headers) end ##