Closed srikat closed 10 years ago
Always loading the gist would place a burden on your visitors, your server, and unnecessarily hit GitHub's API, so the gist needs to be cached. I took a look at the link to your site that's in the gist and it appears to be showing the updated code. Were you able to get this to work?
@srikat Make a change to your WP Post itself (one character is enough) and then save (and if necessary, undo the change and save again). The act of saving clears the caching of the gists, both raw and processed (with limited range of line numbers, highlighting, no meta showing etc). Just refreshing the front-end view is not enough to trigger the cache clear.
Thanks for the prompt replies guys.
@bradyvercher I actually created a separate gist and used the shortcode to display it in my Post earlier. I have now replaced it with [gist id="7502706" file="style.css"] and it's working fine.
@GaryJones Great! Just what I needed to know.
I have created a gist (id of 7502706) and used the following shortcode in a Post:
[gist id="7502706" file="style.css"]
I then updated style.css of that gist and made changes.
Upon refreshing my WP post, it still shows the old content of that gist's style.css. Is there a way to have shortcode always render its current content?