Caching Feeds

One of the major problems with the site at the moment is the loading times. When a user visits the site and they are the only user to view it within 30 minutes, some of the feeds may have been updated, by default Magpie RSS parser will check the last time the feed was cached (i.e. downloaded before and stored in memory on the server). If the RSS feed has a newer creation date than the last time the feed was cached the RSS extension will attempt to automatically download the feed again.

This could adversely affect the loading speeds of the website. As a user may visit the site and the RSS module will find that all the feeds have expired and will have to be updated.

I have found that sometimes the site will take upto 20 to 40 seconds to load, and in some extreme cases this times out the browser. Once the user has been to the site the feeds will have been cached and the site will load in less than a second. One way of resolving the problem would be to change the way the RSS module caches feeds, possibly by forcing the system to keep caches for up to half an hour to an hour.

Another way of increasing the speed and most likely the best way, would be to setup a cron job on the server. A cron job is like a scheduled task and can be setup to automatically load up the website say every 30 minute. This would take the loading off the user and system would deal updating the feeds.

Leave a Reply

You must be logged in to post a comment.