views:

29

answers:

1

I know that you can cache the WSDL but is there a way to cache the soap responses through configuration of the php soapclient?

Obviously, we could "cache" ourselves by constructing some tables in a database and running a cron. This will take much more effort and I am wondering if there is a way to specify caching abilities of the explicit SOAP data being returned from soap server to client.

Similar to how a browser can cache various data based on headers ?

Do I need to have the soap server configured properly or is this something I can do strictly on the soapclient.

Our soap server is a 3rd party vendor which we have little control over so I am hoping to keep the solution to soapclient side if possible.

Open to all suggestions/alternatives (aside from the one I mentioned) if this does not exist.

+2  A: 

In short - No. That type of caching is very application-specific, so it's not built in to the protocol for you. I would say that the solution you chalked up your self is a good way to go. A side effect of such a queue is that you get a level of decoupling between your main application and the external service. This can be useful for a lot of things, once you get past the initial development phased (debugging, service windows, logging etc.)

troelskn
Thanks for the answer I did not want to hear. :-) Time to start implementing.
Chris
Ha ha. You're welcome. If you need some more reading, do a lookup for [anti corruption layer](http://www.google.com/search?q=anti+corruption+layer), which is a concept coined by Eric Evans.
troelskn