On 6/9/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I intend to use Django for a project that involves presenting some
> information comming from an external system.
>
> In this particular case, I need to hit a URL that will give me back
> some XML. I need to process the XML and put it in data structures that
> I want to present with Django.
>
> Since the fetching and processing of XML can take more than a few
> seconds, I don't want to have to do it every time a page is fetched on
> the Django website. I would like to be able to check the external XML
> every minute or so and update my data structures at that moment.
>
> What would be the "canonical" approach to do this kind of thing in
> Django? Are threads safe to use with Django or can they present
> problems?


I would think that Django's cache system could be put to good use
here. Define a cache timeout that makes you happy. Then when a page
request is done with a dirty cache, maybe do an md5 on your XML file.
If it hasn't change, just return the page from cache again.

Note: I haven't actually tried Django's cache system yet, so someone
let me know if I've got this all wrong.

Jay P.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to