Ask a Jedi: Cached cfinvoke and web services

Geoff asks:

This article: http://www.adobe.com/go/13115e61 states that dns lookups for cfhttp requests are cached forever by default. Is the behaviour the same for cfinvoke too? (That is if I'm invoking a web service for example)

Yes and no. ColdFusion won’t cache the result of the web service call, what it will do is cache the WSDL of the web service. So any change to methods (addition, subtraction, modification) will not be usable by ColdFusion. Luckily you can just go into the ColdFusion administration and refresh or remove the cache. I do wish cfinvoke had an optional argument to let me refresh the cache via the call. It isn’t something I’d use during production, but during testing it would be nice. I’m not sure if the Administrator API allows for this. One day soon I’m going to generate the CFC docs as PDF (using this) and will put them online so they are easier to find.

So for my readers, I know I’ve blogged this before, but I think I see this question/problem once a week, so forgive me for repeating myself.

Edited As a follow up. I had misread this question a bit. He wants to know if cfinvoke will cache the dsn look up in a case like this:

<cfinvoke webservice="https://www.secpay.com/java-bin/services/SECCardService?wsdl" method="validateCardFull" etc>

I’m checking into this, and will post the answer to the main entry.

Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate. He focuses on JavaScript, serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com

Comments