Re: [Zope] getting a unique object id

2007-03-30 Thread Dieter Maurer
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
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] getting a unique object id

2007-03-29 Thread Andreas Jung



--On 29. März 2007 17:50:24 -0700 David Bear <[EMAIL PROTECTED]> 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



pgpsfffFZN9r2.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] getting a unique object id

2007-03-29 Thread David Bear
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"
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )