Title: Exclude php from being cached
Last modified: August 30, 2016

---

# Exclude php from being cached

 *  Resolved [mennobouma](https://wordpress.org/support/users/mennobouma/)
 * (@mennobouma)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/exclude-php-from-being-cached/)
 * Thanks for this great plugin!
 * I have a question about excluding php from being cached. I’m using the code on
   this page [https://docs.woothemes.com/document/show-cart-contents-total/](https://docs.woothemes.com/document/show-cart-contents-total/)
   to show the cart subtotal in the header of my site.
 * When i add something to the cart it works but if i go to another page this code
   is cached by Zencache and ‘freezes’ when i add a new product to the cart. I would
   like to exclude this piece of code from the cache. Any idea how to solve this?
 * [https://wordpress.org/plugins/zencache/](https://wordpress.org/plugins/zencache/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Raam Dev](https://wordpress.org/support/users/raamdev/)
 * (@raamdev)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/exclude-php-from-being-cached/#post-6700815)
 * [@mennobouma](https://wordpress.org/support/users/mennobouma/) Excluding only
   portions of a page from being cached is not currently possible. That’s referred
   to as “dynamic fragmentation”, which we have a feature request open for (see 
   [this GitHub issue](https://github.com/websharks/zencache/issues/222); I suggest
   leaving a comment there to show your vote for this feature).
 * See also: [Why isn’t my dynamic content updating?]([http://zencache.com/kb-article/why-isnt-my-dynamic-content-updating/](http://zencache.com/kb-article/why-isnt-my-dynamic-content-updating/))

Viewing 1 replies (of 1 total)

The topic ‘Exclude php from being cached’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/zencache_3c4c6b.svg)
 * [ZenCache](https://wordpress.org/plugins/zencache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/zencache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/zencache/)
 * [Active Topics](https://wordpress.org/support/plugin/zencache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/zencache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/zencache/reviews/)

## Tags

 * [exclude](https://wordpress.org/support/topic-tag/exclude/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 1 reply
 * 2 participants
 * Last reply from: [Raam Dev](https://wordpress.org/support/users/raamdev/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/exclude-php-from-being-cached/#post-6700815)
 * Status: resolved