Welcome Guest, Not a member yet? Register   Sign In
XML Caching help
#1

[eluser]Unknown[/eluser]
As a CI newbie I'm looking for some advice on how best to deal with external XML feeds.

I'm pulling ~10 XML feeds, each with 100-200 items in different layouts from various sources with a view to consolidating, filtering and displaying them based on user preferences.

These XML feeds are constantly updated and pulling all feeds can take a few seconds which is far from ideal. What I would like to do is to cache the feeds for 2-5 minutes but would like to know:

a) Should I cache the results to a MySQL database or to the filesystem (in a single XML file)?
b) What is the best method of automating the data pull? i.e. cron job or other...

and why? (I always want to know why!!!)

Thanks in advance.
#2

[eluser]pickupman[/eluser]
Use Phil Sturgeon's Cache library linked in my signature. I use for a very similar reason. You can cache any model or library call. I wrote a library to fetch feeds via curl, then use the cache library to cache the results. You can set any time limit.




Theme © iAndrew 2016 - Forum software by © MyBB