Nutrition / Supplements
Support & Evolution
Result: Significant reduction in server resource consumption without compromising complex business rules
Segmented cache for e-commerce with variable pricing
The challenge
Essential Nutrition operates an e-commerce with dynamic promotional campaigns: prices and communications vary according to the moment, channel, and active promotion, meaning two users accessing the same product in different contexts may see different values and conditions. Banners and communications are also campaign-driven, with specific conditions for each ongoing promotion.
This business model is legitimate and strategic. The problem is that it makes traditional Magento caching unviable. When each request can return different content depending on the active campaign, the platform simply discards the cache and processes everything from scratch. The server absorbs this work continuously.
The result was high resource consumption even outside traffic peaks. It was not a matter of instability, the store worked. It was a matter of efficiency: the operation cost more than it should, and the headroom for growth was compressed.
The solution
Trezo analyzed the existing cache architecture and identified that the problem was not the business rule itself, but the absence of a cache layer that respected that rule without ignoring it entirely.
The solution was to implement segmented caching in Magento. Instead of treating each promotional variation as a unique, non-cacheable case, the logic began identifying the relevant campaign contexts and serving specific cached versions for each one. The catalog, which represents the majority of requests, started being kept in cache even with multiple simultaneous price variations. Banners and campaign communications followed the same logic: each promotional context has its cached version, served without redundant processing.
The result was that the store kept all the complexity of its business rules fully intact, including dynamic campaign-based pricing, segmented communication, and special handling per active promotion, while substantially reducing the server workload required to deliver that experience.
The results
- Significant reduction in server resource consumption under continuous operation
- Functional cache maintained even with multiple simultaneous price variations in the catalog
- Campaign context segmentation fully preserved on the frontend
- Greater capacity headroom to absorb traffic spikes



