Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
add business profile to in mem cache
Additional Changes
Motivation and Context
add business profile to in mem cache, so that repeated reads from application doesnt go to db
How did you test it?
try /payments create and check server logs for select query for business_profile
DEBUG diesel_models::query::generics: query: SELECT "business_profile"."profile_id", "business_profile"."merchant_id", "business_profile"."profile_name", "business_profile"."created_at", "business_profile"."modified_at", "business_profile"."return_url", "business_profile"."enable_payment_response_hash", "business_profile"."payment_response_hash_key", "business_profile"."redirect_to_merchant_with_http_post", "business_profile"."webhook_details", "business_profile"."metadata", "business_profile"."routing_algorithm", "business_profile"."intent_fulfillment_time", "business_profile"."frm_routing_algorithm", "business_profile"."payout_routing_algorithm", "business_profile"."is_recon_enabled", "business_profile"."applepay_verified_domains", "business_profile"."payment_link_config", "business_profile"."session_expiry", "business_profile"."authentication_connector_details" FROM "business_profile" WHERE ("business_profile"."profile_id" = $1) -- binds: ["***"]
hit payments create again, logs shouldnt be showing select query for business profile
Checklist
cargo +nightly fmt --all
cargo clippy