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?

3 REPLIES 3

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

@robertcameron_r Check the mode.

 

If you are not default mode then just switch to developer and after creating everything just flush the cache and check the results.

 

Thanks

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

Based on the tag of your request you are using Magento 1. If that is correct what I would do is to turn off cache on that specific block.

 

Check out this https://magento.stackexchange.com/questions/161274/how-to-disable-cache-for-particular-static-block-... and try to disable the cache for your block. Hopefully, that fixes your issue without.

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

I was getting the same issue and this link help me to fix it.

 

Thank You

pnrstatus.io