amzn / amazon-payments-magento-2-plugin

Extension to enable Amazon Pay on Magento 2
https://amzn.github.io/amazon-payments-magento-2-plugin/
Apache License 2.0
109 stars 77 forks source link

Amazon\Pay\Model\CustomerManagement::setAmazonIdExtensionAttribute - Caching does not handle missing amazon user (Remains null) #1254

Open steven-hoffman-jomashop opened 1 day ago

steven-hoffman-jomashop commented 1 day ago

What I expected

For Amazon\Pay\Model\CustomerManagement::setAmazonIdExtensionAttribute:

What happened instead

Steps to reproduce the issue

Call into Amazon\Pay\Model\CustomerManagement::setAmazonIdExtensionAttribute multiple times.

Possible Fix

Your setup

sgabhart22 commented 9 hours ago

Hi @steven-hoffman-jomashop ,

Does this manifest in the shopper's experience somehow, and if so, could you please provide an example? e.g., duplicated quotes, cart being emptied unexpectedly, etc. A few more details would help us debug and remediate more effectively.

Thanks, Spencer

steven-hoffman-jomashop commented 48 minutes ago

Hi @sgabhart22,

This would not 'manifest' to the customer; aside from a slower response time. The issue is that the caching logic does not 'consider' a null response as a 'cachable' response. As such the caching logic does not handle a missing 'customer link' and will repeat the query to the database if the same customer model is requested again.

In Summary, this is a performance issue, not a bug in 'behavior'.