Title: Exclude external links from HTML cache?
Last modified: December 19, 2023

---

# Exclude external links from HTML cache?

 *  Resolved [rotornut44](https://wordpress.org/support/users/rotornut44/)
 * (@rotornut44)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/exclude-external-links-from-html-cache/)
 * I’m running the Avada theme on a website that I maintain, which uses Avada’s 
   built-in Instagram post gallery.
 * I’m having some caching issues with the links. Avada looks for new posts and 
   is suppose to fetch the updated image CDN links once a day (The cron does appear
   to be running). However, the links seem to be getting cached in the HTML and 
   are not updating, leading to that element breaking once the Instagram CDN links
   expire every few days.
 * What can I do to make sure that these external links are never cached in the 
   HTML?
 * The links are formatted like so:
 *     ```wp-block-code
       https://scontent-bru2-1.cdninstagram.com/
       ```
   
 * The sub domain will change per image depending on where it is served from, but
   the domain _cdninstagram.com_ always stays the same.
 * As far as what I have tried so far: I have excluded “_cdninstagram.com_” in _Cache
   > Excludes > Do Not Cache URIs_. I have done the same in Page Optimization > 
   Tuning > URI Excludes. I have disabled HTML minification and I have also excluded
   the JS files for that module just as good measure.
 * HTML doesn’t appear to be (and shouldn’t be) cached on Cloudflare.
 * What can I do to make sure that these links always stay updated? I’m having to
   manually purge the cache about every two days to keep it updated which I cant
   do for the long run.
 * **Report number:** WKLBACNV
 * Thanks!
   Chris
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fexclude-external-links-from-html-cache%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/exclude-external-links-from-html-cache/#post-17290069)
 * no , that won’t work , I guess only solution is purge the cache alone with the
   update , the only question for that is , you need to find a way to trigger this
   action , from our plugin , we have purge API can use
 * was that instagram section added by something like widget ? or shortcode ?
 *  Thread Starter [rotornut44](https://wordpress.org/support/users/rotornut44/)
 * (@rotornut44)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/exclude-external-links-from-html-cache/#post-17290143)
 * Hmm. It’s not a shortcode, so I assume widget? It’s an element within the Avada
   theme’s page builder so it is built-in functionality to the theme itself.
 * I definitely don’t want to flush the entire cache every day if I don’t need to,
   but I could care less if only the HTML gets flushed each day or even if it wasn’t
   cached altogether.
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/exclude-external-links-from-html-cache/#post-17290148)
 * the cache is per page , does that instagram thing show up on all pages ? or only
   home page ?
 *  Thread Starter [rotornut44](https://wordpress.org/support/users/rotornut44/)
 * (@rotornut44)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/exclude-external-links-from-html-cache/#post-17290171)
 * It’s only on the home page, so could I do “Scheduled Purge URLs” for the domain“
   nfwllc.com/” or is there a better way to handle that?
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/exclude-external-links-from-html-cache/#post-17290204)
 * yes , you can try that approach first
 *  Thread Starter [rotornut44](https://wordpress.org/support/users/rotornut44/)
 * (@rotornut44)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/exclude-external-links-from-html-cache/#post-17302562)
 * Hi again [@qtwrk](https://wordpress.org/support/users/qtwrk/),
   I put this into
   place a week ago and have ignored it since then because of the holidays. I checked
   back in today though and noticed that the links are once again broken.
 * I looked into the cron events with WP Crontrol and noticed that no cron seems
   to show up for the scheduled purge. Is this something I still need to configure
   manually? I’ve not really messed around with cron before past just monitoring
   for events.
 * I left the links broken this time and did not flush the cache, so you can follow
   the original URL above to see what I am running into (bottom of the home page).
 * ![](https://i0.wp.com/i.imgur.com/fnxiExQ.png?ssl=1)
    -  This reply was modified 2 years, 5 months ago by [rotornut44](https://wordpress.org/support/users/rotornut44/).
    -  This reply was modified 2 years, 5 months ago by [rotornut44](https://wordpress.org/support/users/rotornut44/).
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/exclude-external-links-from-html-cache/#post-17302566)
 * purge it now , let me check again.
 *  Thread Starter [rotornut44](https://wordpress.org/support/users/rotornut44/)
 * (@rotornut44)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/exclude-external-links-from-html-cache/#post-17302574)
 * Purged now. Had to do a Purge All for it to go. Purge this page doesn’t seem 
   to be enough.
 * Also added an image above with my scheduled purge settings.
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/exclude-external-links-from-html-cache/#post-17302579)
 * the external links gives “URL signature expired” error
 * remove that schedule purge , I have a simpler idea , please go to Cache -> TTL-
   > `Default Front Page TTL` , set it to 43200 and purge all , see how it goes
 *  Thread Starter [rotornut44](https://wordpress.org/support/users/rotornut44/)
 * (@rotornut44)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/exclude-external-links-from-html-cache/#post-17302582)
 * OK. Got that removed and the TTL updated. Will monitor it over the next few days
   to see what happens. Thanks!
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/exclude-external-links-from-html-cache/#post-17302594)
 * you can also try `21600` though
 *  Thread Starter [rotornut44](https://wordpress.org/support/users/rotornut44/)
 * (@rotornut44)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/exclude-external-links-from-html-cache/#post-17339195)
 * Hi again [@qtwrk](https://wordpress.org/support/users/qtwrk/)
 * I made the front page TTL change to 43200, purged all and checked it throughout
   the week. The links did break again and it never cleared, so I bumped the TTL
   down to 21600 as you suggested. Checked it again earlier this week and the links
   were broke again, checked back this morning and they are still broke.
 * It’s almost as if the headers aren’t being respected. Not sure what to do at 
   this point?
 * I’ll leave the home page as is so maybe you can see something that I’m not.
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/exclude-external-links-from-html-cache/#post-17339553)
 * frankly say , it’s how/when that CDN image link expires , it could be 5 minutes,
   it could be an hour , you can keep trying a lower TTL

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

The topic ‘Exclude external links from HTML cache?’ is closed to new replies.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

## Tags

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

 * 13 replies
 * 2 participants
 * Last reply from: [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * Last activity: [2 years, 5 months ago](https://wordpress.org/support/topic/exclude-external-links-from-html-cache/#post-17339553)
 * Status: resolved