How ShipperHQ Caches Shipping Rates
Optimize shipping rate accuracy and testing by efficiently managing cached rates in ShipperHQ
Table of Contents
Overview
Learn how ShipperHQ caches shipping rates and discover how caching helps improve your checkout experience. This guide provides insights into the rate calculation process, caching behavior, and important notes for specific platforms like Magento 2. 😊
Rate Calculation
When you request shipping rates from ShipperHQ, the system calculates these rates based on various elements such as origins, carriers, shipping rules, and boxes for the specific cart and shipping address. The determined shipping methods and rates are temporarily stored server-side to speed up future requests. This caching is automatic and cannot be disabled.
Caching
If a customer requests a shipping rate multiple times for the same cart and shipping address, the results are returned faster and without affecting your monthly request limit. However, during testing, you might encounter cached rates if you repeatedly use the same cart contents and shipping address. To bypass the cache and receive updated rates, simply modify any part of the cart or address. This could include adjusting the product quantity, adding or removing items, or making a minor tweak, such as changing a single character in the postal code. 💡
Cache Lifetime for Magento 2
Our Magento 2 extension offers a feature to define how long cached rates remain valid. Configurable within Magento’s Dashboard, you can set a time limit for cached rates, which defaults to 300 seconds. This ensures that time-sensitive orders, like same-day delivery, have the latest shipping information. To adjust this setting, navigate within Magento 2 to:
Stores > Configuration > Sales > Delivery/Shipping Methods
Under ShipperHQ, you'll find a field labeled Cache Lifetime. Time is measured in seconds, and the default value is 300.
Rate Calculator
In the Test Your Rates section, you can freely edit the products and address. As an example, adjusting a product’s weight by 0.001 will trigger a new request for "fresh" rates. ⚠️