chrziz Posted May 28, 2006 Share Posted May 28, 2006 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:[code] * 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[/code]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:[code]include_once('/rss/magrss/rss_fetch.inc');define("MAGPIE_CACHE_ON", false);$rss = fetch_rss("http://gmail.google.com/gmail/feed/atom/");foreach ($rss->items as $item ) { $count++;}if ($count > 0) { $message = "$count new messages";} else { $message = "No new messages.";}[/code]It doesn't work and just grabs the cached page, Can someone tell me what I'm doing wrong?Thank youChris Quote Link to comment https://forums.phpfreaks.com/topic/10657-magpie-rss-help/ Share on other sites More sharing options...
AndyB Posted May 28, 2006 Share Posted May 28, 2006 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] Quote Link to comment https://forums.phpfreaks.com/topic/10657-magpie-rss-help/#findComment-39774 Share on other sites More sharing options...
chrziz Posted May 29, 2006 Author Share Posted May 29, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/10657-magpie-rss-help/#findComment-39825 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.