Skip to content

Commit

Permalink
Revert "Prevent redis cache if data is nil (#12494)" (#12495)
Browse files Browse the repository at this point in the history
This reverts commit 23c7f1f.
  • Loading branch information
RachalCassity authored Apr 27, 2023
1 parent 9df5c53 commit f9a781d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def immunizations
Rails.logger.info('mobile immunizations cache fetch', user_uuid: @current_user.uuid)
else
immunizations = immunizations_adapter.parse(service.get_immunizations)
Mobile::V0::Immunization.set_cached(@current_user, immunizations) if immunizations.present?
Mobile::V0::Immunization.set_cached(@current_user, immunizations)
Rails.logger.info('mobile immunizations service fetch', user_uuid: @current_user.uuid)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ def fetch_appointments(user:, start_date: nil, end_date: nil, fetch_cache: true,

appointments, failures = fetch_from_external_service(user, search_start_date, search_end_date)

if appointments.present? && (cache_on_failures == true || failures.blank?)
Mobile::V0::Appointment.set_cached(user,
appointments)
end
Mobile::V0::Appointment.set_cached(user, appointments) if cache_on_failures == true || failures.blank?

Rails.logger.info('mobile appointments service fetch', user_uuid: user.uuid)
[appointments, failures]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def perform(uuid)
Rails.logger.warn('mobile claims pre-cache set failed', user_uuid: uuid,
errors:)
else
Mobile::V0::ClaimOverview.set_cached(user, data) if data.present?
Mobile::V0::ClaimOverview.set_cached(user, data)
Rails.logger.info('mobile claims pre-cache set succeeded', user_uuid: uuid)
end
end
Expand Down

0 comments on commit f9a781d

Please sign in to comment.