MagpieRSS Caching

Ever since I installed MagpieRSS on my server (it powers my del.icio.us sidebar links), the site loads a lot slower. I’m pretty sure it’s happening because Magpie’s caching isn’t enabled. I’d like to have caching anyway to prevent my site from overloading del.icio.us—not that it would with my piddly traffic, but it seems incredibly impolite to ping someone else’s server every time my site loads.

I’ve gone through the readme files and tried the steps outlined for setting up caching, but it doesn’t seem to be working correctly. If anyone knows anything (or can figure anything out) about MagpieRSS, please let me know. Thanks. End mark

  • Does you cache directory exist?

    Do you see files in it named things like ’25cd55bbc2766c84b57a3302daa8ba2e’?

    Try turning on debugging and see what happens.

    define(‘MAGPIE_DEBUG’, 1)

  • Heh. It has seemed a bit slow during the past week or so, but it seemed to pop right up just now.

  • Tom

    I agree with James. This past week or so, the stylesheets took forever to load. Like actual seconds.

  • Kellan, I really appreciate your help, and I’m actually pretty surprised you found this post. Do you just search the web for Magpie references all day long?

    Well, it’s still not caching. I’m not sure why, but it does seem to be going much faster in spite of my inability to configure things properly.

    Anyway, I tried turning on the debug mode, but where do I put that line in my code? Should it be above or below the require_once ('magpierss/rss_fetch.inc'); line? What exactly should it do? Is it supposed to output an error log somewhere? As far as I can tell, it isn’t doing anything.

    And aren’t there weird circumstances that can prevent caching from working altogether? Like if my server is configured to run scripts as “nobody”? I tried what the documentation says to do in that situation (try having the cache stored in the tmp folder), but that doesn’t seem to do anything either.

    I’m really stuck. :$

  • Joey, I had the same problem when I started using MagpieRSS. As it turned out, I was just pointing it to the wrong place for the cache directory (or rather, I hadn’t created the cache directory where it expected). Eventually I figured out that you have to specify the cache directory relative to the script that’s including magpie. My index.php (that the main blog loads from, and which includes fetch_rss.inc) is in /, and the cache dir is in /magpierss/cache, so my MAGPIE_CACHE_DIR definition looks ike this:

    define('MAGPIE_CACHE_DIR', 'magpierss/cache');

    I know that’s a poor explanation, but you’ll know it’s working when it creates a file with a long name like Kellen posted in your cache directory. And, of course, don’t forget to chmod 0777 the directory. :)

    Feel free to IM me if you need any more help troubleshooting, though I make no promises.

  • In case anyone is still worried about me, let me assure you that I figured this out. Magpie is now caching my link feeds correctly. Thanks to everyone for your help.

  • what was the fix?

    i have my cache set to 775, not 777. i am not sure what the best setting (most secure yet still works) is. thx.

  • Tim

    define(‘MAGPIE_CACHE_DIR’, ‘magpierss/cache’);
    I set my cache with that line. Worked for me.