• Resolved WPChina

    (@wordpresschina)


    I am posting the headlines of other blogs on my WP blog via RSS. For the last week, 4 of the feeds are updating fine, but two seem stuck — even though the source feeds have information from today, my WP blog still has information cached from 10 days ago.

    Is there a way to “flush” the RSS cache on my blog? I have access to PHPMyAdmin, so is there a way to run a query, and if so what should I do?

    This is the code I’m using to grab RSS feeds:

    <?php
    require_once(ABSPATH . WPINC . '/rss-functions.php');
    $rss = fetch_rss('https://LINKTOFEED');
    echo '<!--Start-->';
    for($i=0;$i<4;$i++) {
    $item=$rss->items[$i];
    echo '<p><a href="'.$item['link'].'">'.$item
    ['title'].'</a></p>';
    }
    echo '<!--RSS FEED STOPS HERE-->';
    ?>
Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter WPChina

    (@wordpresschina)

    Sorry to bump after 2 days, but this is rather urgent and I can’t find RSS flushing info elsewhere — I’m sure others have had similar problems, right?

    timfitz

    (@timfitz)

    I am having the same problem.

    Thread Starter WPChina

    (@wordpresschina)

    Yes, does anyone have any advice for timfitz and me?

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    In the wordpress options table, look for rows that have a key of rss_big-bunch-of-gibberish-here. Those are the cache entries. Delete those rows.

    Note, only delete the rows with the gibberish looking keys. Don’t delete rss_anything_else.

    Thread Starter WPChina

    (@wordpresschina)

    Tks!!!

    So is there no setting that can be passed in for affecting the cache lifetime/length? I’d like to do something like 30 minutes, but it seems to be caching for more than 12 hours (and obviously I don’t want to be digging around in mysql tables all the time).

    Thanks.

    you can set the time to cache feeds, its just Magpie.

    wp-includes/rss.php

    if ( !defined('MAGPIE_CACHE_AGE') ) {
    		define('MAGPIE_CACHE_AGE', 60*60); // one hour
    	}

    change as you like.

    Ah, turns out it wasn’t fetch_rss causing this, but Twitter changed their atom feeds to run through a password protected bloglines account. But vanilla RSS still works. Thanks anyway whoo good to know.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How can I flush the RSS cache?’ is closed to new replies.