Jump to content


Magpie RSS Help

  • Please log in to reply
2 replies to this topic

#1 chrziz

  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 28 May 2006 - 06:11 PM

I am using [a href=\"http://magpierss.sourceforge.net/\" target=\"_blank\"]Magpie RSS[/a] to read an rss feed and by default it uses a feed caching system that so it only grabs the feed once an hour (or whatever time you specifty). It also has a constant that you can define to disable caching:

 * CONSTANTS - redefine these in your script to change the
 * behaviour of fetch_rss() currently, most options effect the cache
 * MAGPIE_CACHE_ON - Should Magpie cache parsed RSS objects? 
 * For me a built in cache was essential to creating a "PHP-like" 
 * feel to Magpie, see rss_cache.inc for rationale

Here's the [a href=\"http://chrziz.com/rss_cache.txt\" target=\"_blank\"]rss_cache.inc[/a] it says to refer to.

I am fairly new to php and I am trying to turn the caching off, but just for a specified script so it grabs new info every time the script is executed and not pull the cached old data.

This is what i was trying to do:

define("MAGPIE_CACHE_ON", false);

$rss = fetch_rss("http://gmail.google.com/gmail/feed/atom/");

foreach ($rss->items as $item ) {

if ($count > 0) {
    $message = "$count new messages";
} else {
    $message = "No new messages.";

It doesn't work and just grabs the cached page, Can someone tell me what I'm doing wrong?

Thank you

#2 AndyB

  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 28 May 2006 - 06:47 PM

maybe this is helpful -> [a href=\"http://magpierss.sourceforge.net/faq.php#caching-doesnt-seem-to-be-worki\" target=\"_blank\"]http://magpierss.sourceforge.net/faq.php#c...eem-to-be-worki[/a]
Legend has it that reading the manual never killed anyone.
My site

#3 chrziz

  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 29 May 2006 - 12:57 AM

Thanks for that, but I've looked that website over 50 times and haven't found out how to turn the caching off. The caching works properly, but I just cant disable it for certain scripts that need updated feed data.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users