Changing any setting resets the short-term cache. Are you seeing no tweets if that happens?
You can also clear the main Tweet caches by setting no_cache=1.
If no tweets are showing up following a variable change, have the keys on the setting page changed? It sounds as if your site is not picking up tweets and so is relying on the cache
Martin
One way to test this is to deliberately test an incorrect set of keys (by changing a letter) vs. the correct set on the settings page – and then comparing error messages!
Thread Starter
njs
(@njs)
Hi.Thanks for the speedy response!
I am always seeing tweets, it’s just that they revert to old ones.
I added no_cache=1 and that does show the latest tweets but setting no_cache=0 also shows latest tweets (I assume it is using cache here though). Remving no_cache reverts to old tweets again.
I tried all this with a bad key (and the plugin gave gave me the authentication messages upon saving settings) but it made no difference in either situation. That is, with incorrect keys, it showed latest with no_cache=1 and no_cache=0 and old with no_cache removed completely.
Weird. It usually works fine for me.
This is a problem that occasionally occurs – and I can’t work out how unfortunately! In essence, the ‘transients’ that cache the HTML stop lapsing – which should be impossible.
If you add no_cache=0 to the shortcode, it’s no difference from the default settings but should solve the problem. It won’t cause any problems.
Martin
… although I will see if I can get the no_cache=1 setting to clear the transients as well – although that will need a bit of development.
Thread Starter
njs
(@njs)
OK, easy fix. Thanks. Could no_cache=0 be added as a default behind the scenes so that plugin updates fix the issue and won’t require changes to shortcodes for people?
Currently the default is no_cache=FALSE. Changing it to no_cache=0 means that the code runs the same way, but that the text_cache_id gets a different ID – and so you avoid the transient that’s not lapsing.
I’ve written a small bit of code that should clear a non-lapsing transient for which no_cache=1 – although I’ve not had a chance to fully test it yet. As soon as I have I’ll upload it as the Development version and let you know.
In theory it means you could load the page once with no_cache=1 in your shortcode – and then remove it – and the problem should be resolved.
The new development version should now clear the problem tweets if you set no_cache=1, load the page and then remove no_cache=1.
Thread Starter
njs
(@njs)
Hi. Thanks for this.
I did a test before and after installing that new development version. The tweets were still showing old tweets before but the new plugin has fixed the issue so I am seeing the latest now. I don’t think I needed to do the step of setting no_cache=1, though.
All seems good now – so thanks so much for your time!
Great to hear it works!
I had added some code in version 1.8.1 to tackle the non-expiring cache problem – so maybe that started working properly.
Either way, I’m glad the problem is solved!