Would it be possible (or does this exist already?) to have an optional parameter to bypassed the cache? This would help with development environments where the server is changing rapidly.<br><br>I appreciate the work you have done on this project. It is clearly the first choice of python SOAP client libraries now.<br>
<br>Thanks<br><br>-Bruce<br><br><div class="gmail_quote">On Wed, Jan 13, 2010 at 6:20 AM, Jeff Ortel <span dir="ltr">&lt;<a href="mailto:jortel@redhat.com">jortel@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
All,<br>
<br>
I finished and (committed r637) enhancements to the suds caching.  The previous approach added caching to the Transport layer and was causing some problems.  It /blindly/ cached downloaded XML documents such as WSDLs and imported XSD files as XML text.  The next time the document is needed (at the same URL), the transport returned the local (cached) copy of the XML file and it was SAX parsed as if it was downloaded via http.  This actually saved a lot of time because most servers returned these documents very slowly is many cases.  The problems with this approach are:<br>

  - Corrupt, incomplete or otherwise invalid XML document text was being<br>
    cached because the Transport layer was not content aware.  It simply cached<br>
    whatever it downloaded.<br>
  - Invalid cache files caused SAX parsing exceptions until the cache file<br>
    expired or the user cleared the cache.<br>
  - Cached files had to be SAX parsed every time the were retrieved.<br>
<br>
The approach taken by the r637 enhancement puts caching above the Transport layer and at the Document Processing layer.  By doing this, suds is now caching sax.document.Document objects using python pickle.  This ensures that cached XML documents are valid and allows for proper handling of corrept, incomplete or otherwise invalid cached files.  In the event that a cached file fails to load, the document processing layer simply uses the transport to download a good copy which is then SAX parsed and cached.<br>

<br>
I benchmarked the performance difference between sax parsing and unpickling a 2M XML file using cPickle.  In most cases, I observed a ~2x performance gain using pickle.load() over sax parsing.  Yeah, I&#39;m a little surprised too.  I expected about a ~10x gain but at least it&#39;s significantly better.<br>

<br>
I tried really hard to preserve backwards compatibility but some minor things did have to change.  These things should not affect most users:<br>
  - The caching classes (Cache, FileCache, NoCache) moved from the suds.transport package<br>
    to a <a href="http://suds.cache.py" target="_blank">suds.cache.py</a> module.<br>
  - All caching has been removed from the Transport classes.<br>
  - The get() &amp; put() methods on the Cache interface have changed slightly to be<br>
    document oriented instead of file pointer (fp) or file-like oriented.<br>
  - Users disabling the cache using /NoCache/ should switch to the already<br>
    existing:  Client(url, cache=None) syntax.  Or, import NoCache from the suds.cache.<br>
  - Users implementing their own caches need to adapt to the changes to the<br>
    Cache interface.<br>
<br>
I plan to continue toward caching the entire WSDL (wsdl.Definitions) object but this is a good interim step and solves most of the caching problems for now.<br>
<br>
This has been released in 0.3.9 beta which I believe to be very stable.<br>
<br>
Hope this helps.<br>
<br>
Regards,<br><font color="#888888">
<br>
Jeff<br>
<br>
</font><br>_______________________________________________<br>
suds mailing list<br>
<a href="mailto:suds@lists.fedoraproject.org">suds@lists.fedoraproject.org</a><br>
<a href="https://admin.fedoraproject.org/mailman/listinfo/suds" target="_blank">https://admin.fedoraproject.org/mailman/listinfo/suds</a><br></blockquote></div><br>