Dear Friends,

I am using Python Feedparser (http://code.google.com/p/feedparser/) to
read some RSS feed for my application.

I want to Cache the RSS feed for 1 hour. No need to do the UrlFetch
every single time.

For that, I wrote this CODE -
--------------------------------------------------------
def get_data(NewsID):
        data=memcache.get(NewsID)
        if not data:
                data=feedparser.parse('http://mysite.com/feeds/'+NewsID+'/')
                if not data:
                        memcache.add(NewsID, data, 3600)
        return data
--------------------------------------------------------
The format of NewID is: ABC1234567890 string format



PROBLEM: It seems, it is not Caching at all !!


Can you please tell me whats wrong ???

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to