On Mar 30, 2008, at 4:43 PM, Kenneth Miller wrote:
All,

Is it possible to have a zeo client save and access a cache from script run to run? I'm writing a cgi-script that uses a zeo client connection to gather data and produce and image, and the overhead is quite alot. Seeing as with CGI, the script is initializing python, loading the modules, initializing the connection and retrieving the data each time.


Yes. You can use a persistent cache. See the client option in the ClientStorage constructor and in zConfig.

This might not be a good choice for a CGI script though. In the current implementation, there is no locking of the cache file and it is likely to be corrupted if 2 or more processes open it at the same time.

Jim

--
Jim Fulton
Zope Corporation


_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev

Reply via email to