Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#14 Added function to clear the cache

open
nobody
None
5
2007-02-07
2007-02-07
Anonymous
No

I encountered a situation where I wanted to clear the cache so that RSS feeds (being provided elsewhere in different parts of my own framework) that have just been updated are reflected immediately in the pages using the Magpie RSS aggregator.

Maybe it will turn out useful for other people too.

I just added a function to delete the files in the cache directory.

Discussion

  • Updated RSS Cache with extra clear_cache function

     
    Attachments
  • Logged In: NO

    Didnt find a way to add another file to this tracker, so I am just pasting it here. To make the new function usable you would also need this added to rss_fetch.inc :

    function clear_rss_cache()
    {
    init();

    $cache = new RSSCache( MAGPIE_CACHE_DIR, MAGPIE_CACHE_AGE );
    $cache->clear_cache();
    }