How ShipperHQ Caches Shipping Rates

ShipperHQ Rate Calculation

When requesting shipping rates from ShipperHQ, the rates will be calculated based on the origins, carriers, shipping rules, boxes, etc for that exact cart and shipping address. The resulting shipping methods and respective rates are then stored in a cache server-side for a short time. This is by design and cannot be disabled.


If a customer requests a shipping rate multiple times for the same cart and shipping address the shipping methods and rates will not only be displayed much faster but also this would not count against your monthly request limit.

The caveat of this is during testing: where shipping rules are being modified, boxes are added, etc, you will see cached shipping rates when re-testing. This is because people often test the same cart contents and shipping address over and over again.

To avoid the cache and receive “fresh” (uncached) rates, just change any aspect of the cart or address. This could be the quantity of products in the cart, additional/removed products or something slight, such as changing a single character of the ZIP/postal code.

Cache Lifetime for Magento 2

As ShipperHQ requires the platform to decide when to use cached rates or when to send a new request, our Magento 2 extension has implemented a feature within Magento’s Dashboard to specify a time limit on the validity of cached rates.

This means after the time has exceeded the expiration date of the rates configured (e.g. 300 seconds by default), the checkout will require a new rate before proceeding to placing an order.

The result of this feature prevents the scenario for orders using same day delivery (or other time-sensitive logic) from being made after X amount of time, allowing further control over how your platform accepts orders and the accuracy of rates/available methods in checkout.

This setting can be found by navigating within Magento 2 to:

Stores > Configuration > Sales > Delivery/Shipping methods
Under ShipperHQ you’ll find a field labelled “Cache Lifetime”.

This field unit of time is measured in seconds and has a default value of 300.

Cache lifetime

Rate Calculator

When using the Test Your Rates section the products and address can be edited freely. If, for example, you the weight of one of the example products by 0.001 this will request “fresh” rates.

Was this doc helpful?