php - Dynamic content on cached product page? -


there ecommerce app cached product page using memcached. controller checks key if page cached. if cached takes 1,5 ms output html memory.

$product_rendered = $this->cache->get($key); if(empty($product_rendered)) {  //$product ... data product  $this->cache->set($key, $product, 86400); } 

but there dynamic content changes every 15 minutes on site. delivery terms, product availability, shipping costs, etc.

the question how change dynamic info in cached content when user loads page?

don't want use ajax on page load. can done replacing substring in cached product_info ($product_rendered) like:

$output = sprintf($product_rendered, $dynamic_content); 

maybe there better choice?


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -