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
Post a Comment