Sunday, September 16, 2018

Improve performance of PHPToolkit using caching in WSDL

One approach is to enable caching in the webservice. To do this, the php.ini must be modified.


Follow these instructions:


  1. The PHP version should be at least PHP 5. Webservice is only applicable for this version.
  2. Open the php.ini using any text editor. The php.ini file does not have a standard directory it depends on the flavor of apache server that you are using. Example directory: $\wamp\Apache2\bin\php.ini
  3. Add the following lines:


soap.wsdl_cache_enabled = "1"
; enables or disables WSDL caching feature
soap.wsdl_cache_dir = "/tmp"
; sets the directory name where SOAP extension will put cache files
soap.wsdl_cache_ttl = "86400"
; (time to live) sets the number of second while cached file will be used instead of original one



  1. Save the changes.
  2. To test this, restart all the services if you are using local apache server.
  3. To confirm that the SOAP WSDL configuration is already added, use phpinfo();

No comments:

Post a Comment