[Zope] Seeking tips for persistence in external methods

Farrell, Troy troy.farrell@wcg.com
Thu, 6 Sep 2001 15:39:25 -0500


Try this:
Open file.
Read file.
Calculate MD5sum
If md5 has changed, reparse the file.
If not, show a cached tree.
You'll have to come up with your own method for caching the tree.

Troy

> -----Original Message-----
> From: Oliver Bleutgen [mailto:myzope@gmx.net]
> Sent: Thursday, September 06, 2001 3:22 PM
> To: zope@zope.org
> Subject: [Zope] Seeking tips for persistence in external methods
> 
> 
> Hi, 
> 
> I'm having a tree structure which is defined in a flat
> file via simple x.y.z tokens. I wrote an external method 
> which gets passed such a token, parses this file and returns 
> a dummy method in order to be able to represent this hierachy 
> in zope via the tree tag.
> 
> Now, this works, but naturally takes very long because 
> it parses the file with every invocation from the tree tag.
> 
> Now I can pre-build the whole tree out of objects, but the 
> question is how to store that tree. I don't want to use zopes
> ZODB, because the tree changes potentially every hour.
> 
> As I found out, pickling from an external method seems to
> be not an option.
> 
> anybody any ideas?
> 
> TIA,
> oliver
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>