On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS

  • Hi!

    i am using getFeed to show, on my main page, an extract of my RSS feed. The feed is another page in my site (actually generated using getResource).

    Everything works, but it seems that the data is cached and i cannot get rid of the cache.

    The RSS feed page is marked "uncacheable", getResource is called with !, getFeed is called with !...

    It does not even works when i do Site -> Clear Cache... i have to manually EMPTY my cache folder!

    Please help, or at least point me to some reousrces to understand what goes no.

    (note: even not using getResources but handing the rss my hand have the same problem...)
    • Did you sort this out? I am having the same trouble.
      • Sorry no, never sorted out... lets say i am living with it.
        • getFeed uses the core RSS reader (magpieRSS) which has default cache settings that have nothing to do with the site cache; it caches the feed data locally for a default amount of time (3600 seconds or 1 hour). This needs to be improved and made configurable; anyone feel like opening a ticket for this at http://bugs.modx.com/ -- I’ll add one for getFeed itself to be able to take advantage of whatever configuration needs to be done to make the caching mutable.
          • EDIT 23-11-2012: This does not seem to work unfortunately.

            For anyone using getFeed and want to adjust the caching time: go to core/model/modx/xmlrss/rssfetch.class.php line 348

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

            Change 60*60 to something you prefer.

            Maybe you can also set a key MAGPIE_CACHE_AGE in the system settings, but I am not able to test this right now.

            (I use getFeed one some installations for fetching a twitter RSS feed, but by default new tweets are not showing up because of this 60min cache. But next time you can better use spiefeed for fetching (twitter) feeds [http://rtfm.modx.com/display/ADDON/spieFeed]) [ed. note: michelle84 last edited this post 9 years ago.]
            • You could likely add this define to a plugin or even your config file to set the value before this gets loaded.