• Resolved njs

    (@njs)


    Hi. I have the plugin on a site and it is caching tweets – latest are from January 2016. I know this has cropped up in other posts and I have tried those suggestions (including turning off SSL verification, regenerating keys etc).

    no_rotate is set to ‘0’.

    If I set no_rotate = ‘1’, then the posts actually jump back to October 2015 (displayed as a list).

    Changing the tweet_count from ‘5’ to anything else seems to bust the cache but setting it back to ‘5’ brings the problem back.

    In fact, changing speed from ‘500’ to ‘501’ also seems to force an update (as does changing any other setting).

    Using Rotating Tweets 1.8.4

    Just wondering if you have any ideas.

    Many Thanks!

    https://wordpress.org/plugins/rotatingtweets/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Martin Tod

    (@mpntod)

    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

    Plugin Author Martin Tod

    (@mpntod)

    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.

    Plugin Author Martin Tod

    (@mpntod)

    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

    Plugin Author Martin Tod

    (@mpntod)

    … 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?

    Plugin Author Martin Tod

    (@mpntod)

    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.

    Plugin Author Martin Tod

    (@mpntod)

    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!

    Plugin Author Martin Tod

    (@mpntod)

    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!

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

The topic ‘Caching – old tweets showing’ is closed to new replies.