Suds cache

December 12, 2012

I’m not a fan of cache where they are not needed, because it can turn a simple task into a no-so-simple task, specially when you don’t expect a cache to exists. This happens to suds, the probably best web service access package existing in python. It uses a cache with a default duration of one day stored in /tmp/suds. That cache only cache wsdl and xsd.

I see this feature could have huge advantages to projects using lots of wsdl and xsd under heavy load, because wsdl and xsd don’t change that often,  however its default values could lead to a headache, because you (at least not me) don’t expect to be a cache at all, and, after you realize there are a cache, you wouldn’t expect to be stored in disk.

To purge the cache, well in my case just the entry of the wsdl I need to be reloaded, it works to remove the file containing it.