How ShipperHQ Caches Shipping Rates
Optimize shipping rate accuracy and testing by efficiently managing cached rates in ShipperHQ
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 shipping rates more than once for the same cart and address, ShipperHQ will return the results faster because those rates are temporarily cached. Cached requests don’t count toward your monthly rate request limit.
During testing, you might see cached rates if you keep using the same cart setup. To force ShipperHQ to recalculate and return fresh rates, make a small change to your cart or address, like adjusting a product quantity, adding or removing an item, or even changing one 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. ⚠️