Title: Exclude code block from caching?
Last modified: May 21, 2021

---

# Exclude code block from caching?

 *  Resolved [tonyrboies](https://wordpress.org/support/users/tonyrboies/)
 * (@tonyrboies)
 * [5 years ago](https://wordpress.org/support/topic/exclude-code-block-from-caching/)
 * The top of the main content is a dynamic post grid, so would like to exclude 
   just that block from the caching. Is that possible or do I have to exclude the
   entire page?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fexclude-code-block-from-caching%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Stoyan Georgiev](https://wordpress.org/support/users/stoyangeorgiev/)
 * (@stoyangeorgiev)
 * [5 years ago](https://wordpress.org/support/topic/exclude-code-block-from-caching/#post-14479553)
 * Hey there [@tonyrboies](https://wordpress.org/support/users/tonyrboies/),
 * I am afraid that it is not possible to exclude just a single block of the page
   from the cache.
    You would have to exclude the entire page using the Excluding
   URLs functionality in the Supercacher Settings Tab.
 * Kind regards,
    Stoyan
 *  Thread Starter [tonyrboies](https://wordpress.org/support/users/tonyrboies/)
 * (@tonyrboies)
 * [5 years ago](https://wordpress.org/support/topic/exclude-code-block-from-caching/#post-14482109)
 * Thank you Stoyan, I hope you’ll consider add that functionality to the caching
   code. Many sites have the dynamic rotating post content on the homepage and it
   would be great to exclude it from caching.
 *  Plugin Author [Hristo Pandjarov](https://wordpress.org/support/users/hristo-sg/)
 * (@hristo-sg)
 * SiteGround Representative
 * [5 years ago](https://wordpress.org/support/topic/exclude-code-block-from-caching/#post-14483611)
 * I don’t want to give you high hopes on this – it is not coming to the SGO anytime
   soon. This is a completely different approach to caching and requries a lot of
   customization per each individual website.
 * Generally, it is much better to have the entire page cached and then updating
   the content on the parts that must be fully dynamic using AJAX for example. That
   works great and doesn’t require speciffic server configuration that might be 
   hard to be implemented on a scale.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Exclude code block from caching?’ is closed to new replies.

 * ![](https://ps.w.org/sg-cachepress/assets/icon-256x256.gif?rev=2971889)
 * [Speed Optimizer - The All-In-One Performance-Boosting Plugin](https://wordpress.org/plugins/sg-cachepress/)
 * [Support Threads](https://wordpress.org/support/plugin/sg-cachepress/)
 * [Active Topics](https://wordpress.org/support/plugin/sg-cachepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sg-cachepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sg-cachepress/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Hristo Pandjarov](https://wordpress.org/support/users/hristo-sg/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/exclude-code-block-from-caching/#post-14483611)
 * Status: resolved