I am needing to write an external cache mechanism for rss feeds from zope/plone. My thinking was to use feedparser, then grab the set of object attributes for the item from zope. Then, grab the actual document the feed pointed to and save it. When naming the document that I store locally, I was looking for a simple way to map the zope objectId to the file name hoping it would be unique. However, if this is not unique, is there another attribute from a zope object that I can get that would be? If so, how would I get it? -- David Bear phone: 602-496-0424 fax: 602-496-0955 College of Public Programs/ASU University Center Rm 622 411 N Central Phoenix, AZ 85007-0685 "Beware the IP portfolio, everyone will be suspect of trespassing"
--On 29. März 2007 17:50:24 -0700 David Bear <David.Bear@asu.edu> wrote:
I am needing to write an external cache mechanism for rss feeds from zope/plone.
My thinking was to use feedparser, then grab the set of object attributes for the item from zope. Then, grab the actual document the feed pointed to and save it. When naming the document that I store locally, I was looking for a simple way to map the zope objectId to the file name hoping it would be unique. However, if this is not unique, is there another attribute from a zope object that I can get that would be? If so, how would I get it?
The path of the object? -aj
David Bear wrote at 2007-3-29 17:50 -0700:
... My thinking was to use feedparser, then grab the set of object attributes for the item from zope. Then, grab the actual document the feed pointed to and save it. When naming the document that I store locally, I was looking for a simple way to map the zope objectId to the file name hoping it would be unique.
What do you mean be "the zope objectId"? Persistent objects have an "_p_oid" attribute. It is unique within the ZODB (storage) the object is stored in. I cannot tell whether or not your RSS feed is represented by a persistent object. If it is, you can probably use "_p_oid" as your cache id. -- Dieter
participants (3)
-
Andreas Jung -
David Bear -
Dieter Maurer