Johan Carlsson wrote:
Tres Seaver wrote:

Johan Carlsson wrote:

What exactly is the filestream_iterator that the FileCacheManager uses?

As I understand it this is a new feature?



For Zope >= 2.7.2, ZPublisher defines an interface, ZPublisher.Iterators.IStreamIterator. An application can return an object implementing this interface to the publisher, instead of a string; if so, the publisher hands it directly to medusa, and frees up the application thread / database connection. medusa will use the iterator to send the response back to the user, without first converting it to a single big string.


That's actually brilliant.

If I understand ExternalFile could benefit from using the IStreamIterator interface instead of RESPONSE.write?
For instance, for someone that don't want to store blobs
in the database temporarily :-)

Yup, that is what it is for. Chris has released a FileCacheManager which does this for objects which *are* stored in the ZODB; I think OFS.Image.File does try to work with the FileCacheManager on that.


FileCacheManager is available at:

  http://www.dataflake.org/software/filecachemanager/

with CVS at:

  http://cvs.zope.org/Products/FileCacheManager/

Tres.
--
===============================================================
Tres Seaver [EMAIL PROTECTED]
Zope Corporation "Zope Dealers" http://www.zope.com
_______________________________________________
Zope-Dev maillist - [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Reply via email to