suds-community / suds

Suds is a lightweight SOAP python client for consuming Web Services. A community fork of the jurko fork.
https://suds.readthedocs.io/
GNU Lesser General Public License v3.0
172 stars 54 forks source link

Add custom cache #75

Closed peguerosdc closed 2 years ago

peguerosdc commented 2 years ago

Hi!

I see that Client has an option to cache the wsdls, but I think it would be useful to let users handle the caching.

The way I picture it, is to pass an URL pointing to a file containing the wsdl instead of a web URL, so the Client doesn't have to download it as it is already provided.

Thanks!

phillbaker commented 2 years ago

Hi @peguerosdc, the cache is customizable today, please see: https://github.com/suds-community/suds#performance. It simply needs to conform to the documented interface: https://suds.readthedocs.io/en/latest/suds.html#suds.cache.Cache.

peguerosdc commented 2 years ago

I wanted to tell the cache to point to the XML I manually prepared, but I realized that DocumentCache does just that except that it downloads the files by itself, so that solves my problem. Thanks!