cancel
Showing results for 
Search instead for 
Did you mean: 

Developing Module for Estimated Ship Date having problems with Page Cache

Developing Module for Estimated Ship Date having problems with Page Cache

I made a custom Module for Magento 2. I am using it to generate a pickup date for freight based on a set of rules that aren't overly difficult. In my .phtml file I have the php code that in simple terms finds the current date and time adds days to it based on rules then gives the estimated ship date.

I put a debug section at the bottom. The Current Time (This is the time of day in hours: Eastern Time) isn't updating unless I refresh the cache. I tried one by one until page cache refreshed the time. Is there a way to do this without turning off site cache since I have 50,000+ products?

1 REPLY 1

Re: Developing Module for Estimated Ship Date having problems with Page Cache

@davidowen_david try the below command once and then check if everything is working fine.

 

php bin/magento cache:flush

Thanks